franz steinhaeusler wrote:
>
> how can i achieve that the event close amd the corresponding event
> handler in the Frame is called (or what other signals can be used), to
> exit my application in normal way, when my pc is to shutdowm or
> restarting the os.
>
> Now that is not the case:
> First, settings are only stored, when my app will be closed and
> second, I have an single instance checker, an when next reboot, the
> delete stale or so messagebox appears.
I'm going to answer the question you asked, but I'm also going to make
an editorial comment.
Your current strategy is not the correct one. There are ALWAYS going to
be system termination events that you can't catch (power failure, or
forced app termination, for example). If you have settings that need to
be saved, then the RIGHT answer is to have an idle timer, and write out
any changed settings when the user has been idle for a few seconds.
That way, you know that your persisted settings are always correct, no
matter what happens.
The answer to your question is wx.EVT_END_SESSION, but your app would be
much more reliable if you changed the design so you didn't require that.
--
Tim Roberts,
ti...@probo.com
Providenza & Boekelheide, Inc.