X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3bfec747ddf7b27e6f41f0117cd5cd6755fe021..08a15c0d899daad0ff8cc2ed4c06ff78b8ec3cc3:/wxPython/demo/wxFileHistory.py diff --git a/wxPython/demo/wxFileHistory.py b/wxPython/demo/wxFileHistory.py index 9e0725705a..7cf5ca35d2 100644 --- a/wxPython/demo/wxFileHistory.py +++ b/wxPython/demo/wxFileHistory.py @@ -59,10 +59,10 @@ class TestPanel(wxPanel): EVT_RIGHT_UP(self, self.OnRightClick) EVT_MENU(self, wxID_OPEN, self.OnFileOpenDialog) EVT_MENU_RANGE(self, wxID_FILE1, wxID_FILE9, self.OnFileHistory) + EVT_WINDOW_DESTROY(self, self.Cleanup) - - def __del__(self): + def Cleanup(self, *args): del self.filehistory self.menu.Destroy()