Robin Dunn <robin@alldunn.com> writes:
Here is a working copy of your example:
Robin,
Your code works, but here I have two problems:
import wx, wx.xrc
import wx.wizard
print wx.VERSION
definition = r'''<?xml version="1.0" ?>
<resource>
<object class="wxWizard" name="Wizard">
<title>Test</title>
<object class="wxWizardPageSimple" name="Page1">
<object class="wxStaticText" name="label1">
<label>This is a static text label for Page 1.</label>
<pos>10,10</pos>
</object>
</object>
<object class="wxWizardPageSimple" name="Page2">
<object class="wxStaticText" name="label1">
<label>Page 2</label>
<pos>10,10</pos>
</object>
</object>
</object>
</resource>
'''
app = wx.App(0)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/wxPython/wx.py", line 1951, in __init__
_wxStart(self.OnInit)
AttributeError: wxApp instance has no attribute 'OnInit'
# Load the XRC resource
resource = wx.xrc.EmptyXmlResource()
resource.LoadFromString(definition)
wizard = resource.LoadObject(None, 'Wizard', 'wxWizard')
page1 = wx.xrc.XRCCTRL(wizard, 'Page1')
wizard.RunWizard(page1)
wizard.Destroy()
app.MainLoop()
And, due to the above problem:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'app' is not defined
But the screen is shown. It is a problematic working copy
I'm with wxPython 2.4.2.4 here.
Be seeing you,
···
--
Godoy. <godoy@ieee.org>