diff --git a/basis/alarms/alarms.factor b/basis/alarms/alarms.factor index 9cc05b4159..f9fdce806f 100644 --- a/basis/alarms/alarms.factor +++ b/basis/alarms/alarms.factor @@ -71,7 +71,7 @@ ERROR: bad-alarm-frequency frequency ; ] when* ; : init-alarms ( -- ) - alarms global [ cancel-alarms ] change-at + alarms [ cancel-alarms ] change-global [ alarm-thread-loop t ] "Alarms" spawn-server alarm-thread set-global ; diff --git a/basis/cocoa/cocoa.factor b/basis/cocoa/cocoa.factor index 69d698f9b1..3e933e6643 100644 --- a/basis/cocoa/cocoa.factor +++ b/basis/cocoa/cocoa.factor @@ -7,7 +7,7 @@ compiler.units lexer init ; IN: cocoa : (remember-send) ( selector variable -- ) - global [ dupd ?set-at ] change-at ; + [ dupd ?set-at ] change-global ; SYMBOL: sent-messages diff --git a/basis/core-foundation/fsevents/fsevents.factor b/basis/core-foundation/fsevents/fsevents.factor index 46f6639ab8..1956cd9c20 100644 --- a/basis/core-foundation/fsevents/fsevents.factor +++ b/basis/core-foundation/fsevents/fsevents.factor @@ -151,8 +151,8 @@ SYMBOL: event-stream-callbacks \ event-stream-counter counter ; [ - event-stream-callbacks global - [ [ drop expired? not ] assoc-filter H{ } assoc-like ] change-at + event-stream-callbacks + [ [ drop expired? not ] assoc-filter H{ } assoc-like ] change-global ] "core-foundation" add-init-hook : add-event-source-callback ( quot -- id ) diff --git a/basis/ui/gadgets/tables/tables.factor b/basis/ui/gadgets/tables/tables.factor index d390b1e49b..ba3b5a2f78 100644 --- a/basis/ui/gadgets/tables/tables.factor +++ b/basis/ui/gadgets/tables/tables.factor @@ -46,14 +46,16 @@ mouse-index { takes-focus? initial: t } focused? ; -: ( rows renderer -- table ) - table new-line-gadget +: new-table ( rows renderer class -- table ) + new-line-gadget swap >>renderer swap >>model f >>selected-value sans-serif-font >>font focus-border-color >>focus-border-color - transparent >>column-line-color ; + transparent >>column-line-color ; inline + +:
( rows renderer -- table ) table new-table ; : get-global ( variable -- value ) global at ; : set-global ( value variable -- ) global set-at ; : change ( variable quot -- ) [ [ get ] keep ] dip dip set ; inline +: change-global ( variable quot -- ) [ global ] dip change-at ; inline : +@ ( n variable -- ) [ 0 or + ] change ; : inc ( variable -- ) 1 swap +@ ; inline : dec ( variable -- ) -1 swap +@ ; inline : bind ( ns quot -- ) swap >n call ndrop ; inline -: counter ( variable -- n ) global [ 0 or 1+ dup ] change-at ; +: counter ( variable -- n ) [ 0 or 1+ dup ] change-global ; : make-assoc ( quot exemplar -- hash ) 20 swap new-assoc [ swap bind ] keep ; inline : with-scope ( quot -- ) 5 swap bind ; inline : with-variable ( value key quot -- ) [ associate ] dip bind ; inline -: initialize ( variable quot -- ) [ global ] dip [ unless* ] curry change-at ; inline \ No newline at end of file +: initialize ( variable quot -- ) [ unless* ] curry change-global ; inline \ No newline at end of file diff --git a/extra/drills/deployed/deploy.factor b/extra/drills/deployed/deploy.factor new file mode 100644 index 0000000000..2f62912360 --- /dev/null +++ b/extra/drills/deployed/deploy.factor @@ -0,0 +1,15 @@ +USING: tools.deploy.config ; +H{ + { deploy-unicode? f } + { deploy-threads? t } + { deploy-math? t } + { deploy-name "drills" } + { deploy-ui? t } + { deploy-compiler? t } + { "stop-after-last-window?" t } + { deploy-word-props? f } + { deploy-c-types? f } + { deploy-io 2 } + { deploy-word-defs? f } + { deploy-reflection 1 } +} diff --git a/extra/drills/deployed/deployed.factor b/extra/drills/deployed/deployed.factor new file mode 100644 index 0000000000..43873c99bb --- /dev/null +++ b/extra/drills/deployed/deployed.factor @@ -0,0 +1,36 @@ +USING: accessors arrays cocoa.dialogs combinators continuations +fry grouping io.encodings.utf8 io.files io.styles kernel math +math.parser models models.arrow models.history namespaces random +sequences splitting ui ui.gadgets.alerts ui.gadgets.book-extras +ui.gadgets.books ui.gadgets.buttons ui.gadgets.frames +ui.gadgets.grids ui.gadgets.labels ui.gadgets.tracks fonts +wrap.strings system ; + +IN: drills.deployed +SYMBOLS: it startLength ; +: big ( gadget -- gadget ) T{ font { name "sans-serif" } { size 30 } } >>font ; +: card ( model quot -- button ) big [ next ] ; +: op ( quot str -- gadget )