No wx.App.Exit()?

The OnExit is a method you write, and add to your subclass of wx.App.

So, you might have something like this:

class MyApp(wx.App):
     def OnInit(self):
  # Init actions here...
         frame = MyFrame(None, "logTest")
         frame.Show()
         return True

     def OnExit(self):
         print "On Exit"
  # do my cleanup here....

If it exists, OnExit is called on the way out. Perfect place to save the files when closing.

If you need to do cleanup when a window closes, then the technique Andrea outlined in his message can be used.

···

On Mar 25, 2007, at 2:21 PM, Josh English wrote:

I have hit a snag in my application design. My data is contained in
five XML files. My app needs to edit the information in those files,
and save them when closing. The docs talk about
calling the app.OnExit method, but it doesn't seem to exist. Is the
Exit() method essentially the same thing?

On a more complicated note, can a wx.Panel find get information about
the App object?

--
Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

______________
John Jackson