[Twisted-Python] Re: Can't quit a Tkinter application on MacOS X when using Twisted; fix? workaround?
Russell E. Owen
rowen at u.washington.edu
Mon Apr 13 16:49:58 EDT 2009
In article
<20090410160133.24697.1558421192.divmod.quotient.5786 at henry.divmod.com>,
Jean-Paul Calderone <exarkun at divmod.com> wrote:
> On Tue, 07 Apr 2009 12:20:50 -0700, "Russell E. Owen"
> <rowen at u.washington.edu> wrote:
> >I am trying to convert a cross-platform Python/Tkinter application to
> >use Twisted and have run into a problem: at least on MacOS X I can no
> >longer quit the application.
> >
> >I have appended a minimal script showing the problem.
>
> The example omits this piece of code, recommended by the tksupport module
> docstring:
>
> root.protocol('WM_DELETE_WINDOW', reactor.stop)
>
> I know you posted another solution already, but I'm curious to know if
> the recommended fix works on OS X or if we should be recommended something
> else.
>
> Jean-Paul
Yes, that is useful if your root window can be closed. (In my case it
cannot.)
The other fix mentioned handles the Quit menu and the Quit apple event.
This fix handles the root window being closed killing the application
properly.
-- Russell
More information about the Twisted-Python
mailing list