X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3d9dc1d8798f445a5f74db680808afdab2b11be..f098326325690eb3cb77af3a4c1133cb4d711062:/wxPython/demo/ActiveXWrapper_Acrobat.py?ds=sidebyside diff --git a/wxPython/demo/ActiveXWrapper_Acrobat.py b/wxPython/demo/ActiveXWrapper_Acrobat.py index 06da8cc699..694f875463 100644 --- a/wxPython/demo/ActiveXWrapper_Acrobat.py +++ b/wxPython/demo/ActiveXWrapper_Acrobat.py @@ -62,9 +62,12 @@ class TestPanel(wxPanel): sizer.Add(btnSizer, 0, wxEXPAND) self.SetSizer(sizer) - self.SetAutoLayout(true) + self.SetAutoLayout(True) - def __del__(self): + EVT_WINDOW_DESTROY(self, self.OnDestroy) + + + def OnDestroy(self, evt): if self.pdf: self.pdf.Cleanup() self.pdf = None @@ -114,17 +117,11 @@ if __name__ == '__main__': wxFrame.__init__(self, None, -1, "ActiveX test -- Acrobat", size=(640, 480), style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE) self.tp = TestPanel(self, sys.stdout) - EVT_CLOSE(self, self.OnCloseWindow) - - def OnCloseWindow(self, event): - - self.tp.pdf.Cleanup() - self.Destroy() app = wxPySimpleApp() frame = TestFrame() - frame.Show(true) + frame.Show(True) app.MainLoop()