On Mon, Jan 23, 2012 at 3:42 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > > Exactly. The line "app = MyApp(0)" creates a MyApp instance and then > assigns it to "app". As part of the MyApp creation process, it > creates a MyFrame, which creates a Tab, which creates a Class1, which > attempts to reference "app". All of this happens before that > "MyApp(0)" call has returned, so the result of that call has not > actually been assigned to "app" yet. > > I suggest using wx.GetApp() instead. > > That totally makes sense. However I'm not sure I understand your suggestion how to use wx.GetApp() Isn't the wxApp still not created before Class1 is instantiated so I still can't call wx.GetApp() in __init__ of Class1 can I?
-- http://mail.python.org/mailman/listinfo/python-list