From: macnerd <ma...@re...> - 2002-03-04 17:03:18
|
Perhaps we can make a main event dispather that can handle all of this, and perhaps chuck it into a library. Maybe like a mini-kernel, like the Opera folks do. We can then chuck this into a library and run off of that. Thus, wheter classic, cfm68k, mix-mode nightmare, carbon, the library does its thing and gives us the control we need. - Joaquin -----Original Message----- From: tcl...@li... [mailto:tcl...@li...]On Behalf Of Jack Jansen Sent: Monday, March 04, 2002 7:45 AM To: Joe Laszlo Cc: tc...@li... Subject: Re: [MACTCL] tk/OS X event handling? On Monday, March 4, 2002, at 03:41 , Joe Laszlo wrote: > I had the same problems ((Tcl/Tk and GLUT event loops colliding) with > Mac OS 9 when I tried porting the same app. there and eventually gave > up. I'm sure it could have been done by modifying both Tcl/Tk and > GLUT, but it was just too much effort. On Mac OS 9 (with the Classic event manager) it is pretty much impossible without the cooperation of the various packages: one of the packages will be running ther current event loop with WaitNextEvent and it will get all events. If it gets events for windows it doesn't know about it has little option but dropping them on the floor. With the new Carbon Events things are much brighter. The event loop is out of your own control (probably in CarbonLib in OS9 and maybe even deeper down in the system on OSX, but this is guesswork) and you subscribe to specific events on specific objects. So, all should have been hunky dory. But (and I'm paraphrasing Jim here, or actually my memory of what he said) while this routing all works fine for system generated events it breaks down if you want to modify events on the fly. Theoretically you can subscribe to a lowlevel event (say, "mouse button 3 press"), convert that to something else (say, "mouse button 1 double click") and re-insert that in the flow of things. But this apparently doesn't work, and Tk needs it. So, Tk has an "old-fashioned" event loop where it simply grabs all events and does the dispatching itself. So, foreign windows break:-( But please note that all this explaining is based on memory of a conversation, not on actual experiments yet, so take it with a grain of salt. -- - Jack Jansen <Jac...@or...> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - >> > _______________________________________________ Tcl-mac mailing list Tc...@li... https://lists.sourceforge.net/lists/listinfo/tcl-mac |