Removed automatic "Magic Event Methods" bindings
Added explicit bindings where needed other assorted odds and ends git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -32,6 +32,7 @@ class TestPanel(wxPanel):
|
||||
def __init__(self, parent, log):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.log = log
|
||||
self.pdf = None
|
||||
|
||||
sizer = wxBoxSizer(wxVERTICAL)
|
||||
btnSizer = wxBoxSizer(wxHORIZONTAL)
|
||||
@@ -65,8 +66,10 @@ class TestPanel(wxPanel):
|
||||
self.SetAutoLayout(true)
|
||||
|
||||
def __del__(self):
|
||||
self.pdf.Cleanup()
|
||||
self.pdf = None
|
||||
if self.pdf:
|
||||
self.pdf.Cleanup()
|
||||
self.pdf = None
|
||||
|
||||
|
||||
|
||||
def OnOpenButton(self, event):
|
||||
@@ -112,6 +115,7 @@ 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()
|
||||
|
Reference in New Issue
Block a user