app won't quit?

That’s great. Thank you. I got something similar over on the Python users list. It seems to be working now, the way I think it should. Two further questions:

  1. What do you put in the OnTimeToQuit method? self.Destroy()? That seems to work but I’m not sure if there’s a better way.

  2. The app also quits if I close its (only) window. Fine by me, but that really isn’t the Mac way. Is there a variation that will let the app keep running if all its windows are closed, but quit with cmd-Q or menu Quit? And that’s still cross-platform?

···

Charles O. Hartman

Poet in Residence

Lucy Marsh Haskell '19 Professor of Literatures in English

oak.conncoll.edu/cohar

1. What do you put in the OnTimeToQuit method? self.Destroy()? That seems
to work but I'm not sure if there's a better way.

If that's a method on a wx.Frame, then yes, that's the thing to do.
Though it will only close that Frame -- if there are others, then the
app will stay alive.

2. The app also quits if I close its (only) window. Fine by me, but that
really isn't the Mac way.

right -- but it is the wx way -- some conflict there. However, as a
Mac user, I actually find it kind of annoying that apps stay open with
no Windows, particularly ones that can only have one window. But is
the Mac way.

Is there a variation that will let the app keep
running if all its windows are closed, but quit with cmd-Q or menu Quit?

see: WxMac-specific topics - WxWiki

Those are fro teh C++ docs, but should be transferable.

And that's still cross-platform?

well, it's not -- but you can wrap it in a "if sys.platform" clause.
You really don't want that behavior on other platforms anyway.

-Chris

···

On Wed, May 29, 2013 at 1:01 PM, Charles Hartman <cohar@conncoll.edu> wrote:

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov