From: Kevin W. <kw...@co...> - 2014-09-25 14:36:16
|
Hi Kevan, On 9/25/14, 10:17 AM, Kevan Hashemi wrote: > Dear Kevin, > > Thank you for all the work you are doing to keep Tk going on MacOS. > >> Re-engineering either of these foundational parts of Tcl would, as I >> understand it, go far beyond adjusting a platform-specific >> implementation of the current API > > Indeed it would. But the Tcl event loop has one severe limitation, and I > believe it's the one Michiel is referring to. I had to build my own > event loop on top of Tcl's, because Tcl's would not do the job. > > The problem with Tcl's event loop is that pending "vwaits" are resolved > strictly in reverse order of initiation, and "after" events are ignored > during an active vwait. > Are these issues specific to Tcl/Tk on the Mac, or to Tcl itself? The former perhaps can be addressed, but the latter is an architectural issue that is above my pay grade. > Is it possible to build your own graphics event loop with which to > interact with Cocoa? I of course speak from a position of near-complete > ignorance of the problems you are faced with, so forgive me if I have > wasted your time. The relevant code is in tkMacOSXNotifer.c (which integrates Tk and Cocoa) and more foundationally in tclMacOSXNotifier.c (which provides the Mac-specific implementation of the event loop). The notifier under Cocoa seems a lot more complex than Carbon. According to Daniel Steffen, it switches between an embedded and an external notifier. If a simpler notifier can be built, I have no idea. I'm assuming no, because much smarter people than myself (Daniel Steffen in particular) came up with the current implementation. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |