On Jun 14, 2011, at 1:14 PM, Fred Alger wrote:
> I'm fine with putting this kind of setup into `begin-world` for now.
> I'm just wondering if there's a better way to handle this, as it'd
> handy to be able to set a bunch of variables before handing things off
> to the GUI.
With a bit of boilerplate, you can set up a namespace with "bind" and capture
the namespace into your callback quotation:
H{ } clone :> ns
! initialize variables
ns [
1 "foo" set
2 "bar" set
] bind
! set up the same namespace in the callback
[ ns [ ... ] bind ] register-other-thread-callback
or without locals:
H{ } clone
[ [ 1 "foo" set ... ] bind ]
[ '[ _ [ ... ] bind ] register-other-thread-callback ] bi
-Joe
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk