On Tue, Jun 14, 2011 at 11:52 AM, Jon Harper <[email protected]> wrote:
>> Is this a UI backend implementation detail?  Why (and where) does this
>> new namespace and/or thread get created?
>
> I would guess that it's the start-ui-thread word from ui.private ?
Aha, cool, I didn't find that.  So when I open a window from the
listener, any quots, such as button actions, will run in that
namespace.  I suppose that in a deployed application I could wrap the
`[ ] with-ui` call with a call to `with-logging`, but I can't do that
from the listener.

> Regarding your namespace problem, is it ok to use global variables ?
Actually, no, because while these get set at the bottom of the
listener's namestack, the UI thread starts up (or has already started)
with an empty namestack and will never see the "global" variables.
Same problem, different scope.

Hmm, so wait, that means that the graphical listener runs in a
different thread than the UI… yep, a quick check of `threads.`
confirms that.

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.

best,
- Fred.

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to