Gordon Henriksen wrote:
Oh, it's worse than that—GUI commands need to be issued from the main thread, at least with OS X. (There's no actual requirement as to which thread handles the actual events as long as you treat the OS event queue as the thread-unsafe thing it seems to be) Or so the docs seem to indicate, though they may be a bit conservative.
...
1. Don't call it "events" so that people aren't disappointed and frustrated, or
2. Figure out some way to fold in GUI events.

One general-purpose Parrot event queue, plus another for the GUI thread. When you call a method on the GUI bindings, it really enqueues an event for the GUI thread, which receives the message and calls the actual method.


Or for that matter, enqueue an event in the main queue that only the GUI thread is interested in.

PITA? Yeah. But it oughta work, and if that's the hard part of writing your GUI binding library, you should consider yourself lucky.

--
Brent "Dax" Royal-Gordon <[EMAIL PROTECTED]>
Perl and Parrot hacker

Oceania has always been at war with Eastasia.

Reply via email to