[mac-lisp-ide] runloops, threads, etc.

mikel evins mikel at evins.net
Thu Feb 5 22:58:44 UTC 2004


On Feb 5, 2004, at 2:39 PM, Duncan Rose wrote:

> The add-event-to-queue method converts the Cocoa event into a CLIM 
> event and appends it to a list; the McCLIM event processing pops 
> events off the list when it wants them and does its stuff. This 
> provides a mechanism allowing Cocoa to force events on the back end 
> code, and for CLIM to request them as needed.
>
>

Seems like it should be possible to make a thread for CLIM that waits 
on this queue, so that each time you enqueue a synthesized event the 
CLIM thread wakes up and dequeues it.

When you hand events to the CLIM code, do you tell Cocoa that the event 
was handled? Whichever way you answer there may be subtleties that 
could cause weird behavior; some events are meant to be handled by the 
first responder and that's it; others are meant to be maybe-handled by 
the first responder and then maybe handed off to one or more other 
responders. Finally, Command-key events traverse the responder chain 
*backwards* so that the application has first chance to process them.






More information about the Mac-lisp-ide mailing list