X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8082483b70e7d357f72ff61c484cb2aaf424f9c4..d58a80fae0ea22e2012b17953b6d9deb37f4660b:/wxPython/demo/run.py diff --git a/wxPython/demo/run.py b/wxPython/demo/run.py index c62889b057..d2eac71dae 100755 --- a/wxPython/demo/run.py +++ b/wxPython/demo/run.py @@ -18,7 +18,7 @@ on the command line. """ -import sys +import sys, os from wxPython.wx import * #---------------------------------------------------------------------------- @@ -33,7 +33,8 @@ class RunDemoApp(wxApp): def __init__(self, name, module): self.name = name self.demoModule = module - wxApp.__init__(self, 0) + wxApp.__init__(self, wxPlatform == "__WXMAC__") + def OnInit(self): wxInitAllImageHandlers() @@ -60,9 +61,9 @@ class RunDemoApp(wxApp): # otherwise the demo made its own frame, so just put a # button in this one if hasattr(frame, 'otherWin'): - wxButton(frame, 1101, " Exit ") + b = wxButton(frame, -1, " Exit ") frame.SetSize((200, 100)) - EVT_BUTTON(frame, 1101, self.OnButton) + EVT_BUTTON(frame, b.GetId(), self.OnButton) else: # It was probably a dialog or something that is already # gone, so we're done.