Loading a wizard from an XRC file

The following code appears to work:

    def __init__(self, parent):
        res = wx.GetApp().XRC
        pre = wx.wizard.PreWizard()
        res.LoadOnObject(pre, parent, 'gen_rad_test', pre.GetClassName
())
        self.PostCreate(pre)

Do I have this right? Or is there a better way?

Randolph

If it's not broken, don't fix it. :wink:

···

On 11/4/09 11:33 AM, R Fritz wrote:

The following code appears to work:

     def __init__(self, parent):
         res = wx.GetApp().XRC
         pre = wx.wizard.PreWizard()
         res.LoadOnObject(pre, parent, 'gen_rad_test', pre.GetClassName
())
         self.PostCreate(pre)

Do I have this right? Or is there a better way?

--
Robin Dunn
Software Craftsman

LOL!

So long as there are no hidden cracks. :wink:

Randolph

···

On Nov 4, 1:02 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 11/4/09 11:33 AM, R Fritz wrote:

> The following code appears to work:

> def __init__(self, parent):
> res = wx.GetApp().XRC
> pre = wx.wizard.PreWizard()
> res.LoadOnObject(pre, parent, 'gen_rad_test', pre.GetClassName
> ())
> self.PostCreate(pre)

> Do I have this right? Or is there a better way?

If it's not broken, don't fix it. :wink: