[Tkinter-discuss] Redefine quit menu item on Mac to quit from a Twisted/Tkinter application?
Russell Owen
rowen at u.washington.edu
Thu Apr 9 18:30:08 CEST 2009
Slightly cleaner, I agree, but your suggestion is very similar and
works well. I switched.
I had never heard of ::tk::mac::Quit before, but I see your wiki entry
<http://wiki.tcl.tk/12987> mentions it along with some others.
-- Russell
On Apr 8, 2009, at 5:02 PM, Kevin Walzer wrote:
> Russell Owen wrote:
>> One more bit of information from Daniel A. Steffen in response to a
>> PR I submitted:
>> <https://sourceforge.net/tracker/?func=detail&atid=112997&aid=2745650&group_id=12997
>> > === begin quote ===
>> Iif the tcl proc '::tk::mac::Quit' is defined, it gets called
>> instead of exit upon receipt of a 'quit' apple event (which is what
>> the standard quit menu item sends, as well as other entities in the
>> system such as the dock menu quit item or the graceful Finder
>> restart/shutdown, this is why the quit menu item is special).
>> If ::tk::mac::Quit returns false, the application is not quit.
>> other default apple event handlers are also defined, c.f.
>> tkMacOSXHLEvent.c
>> ==== end quote ====
>
> I forgot about ::tk::mac::Quit--Daniel's right, that's probably a
> cleaner way to go about this than my suggestion.
>
> --
> Kevin Walzer
> Code by Kevin
> http://www.codebykevin.com
More information about the Tkinter-discuss
mailing list