]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/CalendarCtrl.py
better __docfilter__ and other epydoc tweaks
[wxWidgets.git] / wxPython / demo / CalendarCtrl.py
index f8e5ba78c1bf724f1bc21a8a9df15db235e70fe4..89a0ba0471ec87e3373df8210ac651db16ca52dd 100644 (file)
@@ -27,8 +27,9 @@ class TestPanel(wx.Panel):
         self.OnChangeMonth()
 
     def OnButton(self, evt):
-        self.cal.Destroy()
-        self.cal = None
+        if self.cal is not None:
+            self.cal.Destroy()
+            self.cal = None
 
     def OnCalSelected(self, evt):
         self.log.write('OnCalSelected: %s\n' % evt.GetDate())
@@ -63,5 +64,5 @@ so I think both will stay in wxPython.
 if __name__ == '__main__':
     import sys,os
     import run
-    run.main(['', os.path.basename(sys.argv[0])])
+    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])