Have you tried calling Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING,…) only after adding all the pages?
···
On Sun, Mar 30, 2008 at 4:05 PM, Werner F. Bruhin werner.bruhin@free.fr wrote:
Is there a way to check in the event that the module is completely
initialized?I.e. I have two pages in the notebook, when the first one is added using
AddPage, the event is fired, however my second page is not yet
initialized and when I try to check for a variable in this second page I
get an attribute error.I currently work around it by doing “if hasattr(self, ‘secondpage’):”
but I wonder if there is a more elegant way (i.e. skipping these events
while pages are added to the notebook) of doing this.Werner
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users