Hi All,
I have an application that needs to clean up on user logout, and system shutdown, i use the following code:
Code:
class MyApp(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.frame_1 = MyFrame(None, -1, "")
self.SetTopWindow(self.frame_1)
self.Bind(wx.EVT_QUERY_END_SESSION, self.evt_system_shutdown)
self.Bind(wx.EVT_END_SESSION, self.evt_system_shutdown)
return 1
def evt_system_shutdown(self, event):
wx.MessageBox("TRIGGERED!")
self.frame_1.Close(True)
But the messagebox is never displayed, nor my frames close method. Can anyone tell me what I'm missing?