Cleanup some uses of global [ ] bind.
parent
469f4314df
commit
d1f5fefab0
|
@ -245,13 +245,13 @@ M: dinput-game-input-backend (close-game-input)
|
|||
delete-dinput ;
|
||||
|
||||
M: dinput-game-input-backend (reset-game-input)
|
||||
global [
|
||||
[
|
||||
{
|
||||
+dinput+ +keyboard-device+ +keyboard-state+
|
||||
+controller-devices+ +controller-guids+
|
||||
+device-change-window+ +device-change-handle+
|
||||
} [ off ] each
|
||||
] bind ;
|
||||
] with-global ;
|
||||
|
||||
M: dinput-game-input-backend get-controllers
|
||||
+controller-devices+ get-global
|
||||
|
|
|
@ -84,13 +84,13 @@ M: xinput-game-input-backend (close-game-input)
|
|||
FALSE XInputEnable ;
|
||||
|
||||
M: xinput-game-input-backend (reset-game-input)
|
||||
global [
|
||||
[
|
||||
{
|
||||
+dinput+ +keyboard-device+ +keyboard-state+
|
||||
+controller-devices+ +controller-guids+
|
||||
+device-change-window+ +device-change-handle+
|
||||
} [ off ] each
|
||||
] bind ;
|
||||
] with-global ;
|
||||
|
||||
M: xinput-game-input-backend get-controllers
|
||||
{ 0 1 2 3 } ;
|
||||
|
|
|
@ -45,20 +45,18 @@ TUPLE: deploy-gadget < pack vocab settings ;
|
|||
1 >>fill ;
|
||||
|
||||
: <deploy-settings> ( vocab -- control )
|
||||
default-config [ <model> ] assoc-map
|
||||
[
|
||||
<pile>
|
||||
bundle-name
|
||||
deploy-ui
|
||||
deploy-console
|
||||
io-settings
|
||||
reflection-settings
|
||||
advanced-settings
|
||||
default-config [ <model> ] assoc-map [
|
||||
<pile>
|
||||
bundle-name
|
||||
deploy-ui
|
||||
deploy-console
|
||||
io-settings
|
||||
reflection-settings
|
||||
advanced-settings
|
||||
|
||||
deploy-settings-theme
|
||||
namespace <mapping> >>model
|
||||
]
|
||||
bind ;
|
||||
deploy-settings-theme
|
||||
namespace <mapping> >>model
|
||||
] bind ;
|
||||
|
||||
: find-deploy-gadget ( gadget -- deploy-gadget )
|
||||
[ deploy-gadget? ] find-parent ;
|
||||
|
|
|
@ -114,7 +114,7 @@ call( -- )
|
|||
|
||||
! Builtin classes
|
||||
: lookup-type-number ( word -- n )
|
||||
global [ target-word ] bind type-number ;
|
||||
[ target-word ] with-global type-number ;
|
||||
|
||||
: register-builtin ( class -- )
|
||||
[ dup lookup-type-number "type" set-word-prop ]
|
||||
|
|
|
@ -38,7 +38,8 @@ SYMBOL: counter
|
|||
|
||||
0 counter set-global
|
||||
|
||||
M: observer definitions-changed 2drop global [ counter inc ] bind ;
|
||||
M: observer definitions-changed
|
||||
2drop [ counter inc ] with-global ;
|
||||
|
||||
[ gensym [ ] ( -- ) define-declared ] with-compilation-unit
|
||||
|
||||
|
|
Loading…
Reference in New Issue