Enable the use of the WIT in the simple sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2013-06-20 01:07:29 +00:00
parent 0d52a77543
commit b88756456f

View File

@@ -6,6 +6,13 @@
import wx
USE_WIT = False
AppBaseClass = wx.App
if USE_WIT:
from wx.lib.mixins.inspection import InspectableApp
AppBaseClass = InspectableApp
class MyFrame(wx.Frame):
"""
@@ -78,12 +85,15 @@ class MyFrame(wx.Frame):
print("Having fun yet?")
class MyApp(wx.App):
class MyApp(AppBaseClass):
def OnInit(self):
frame = MyFrame(None, "Simple wxPython App")
self.SetTopWindow(frame)
print("Print statements go to this stdout window by default.")
if USE_WIT:
print("Press Ctrl-Alt-I (Cmd-Opt-I on Mac) to launch the WIT.")
self.InitInspection()
frame.Show(True)
return True