calling functions from a different window

Michael Barron barronmo at gmail.com
Thu Dec 6 11:12:18 PST 2007


As someone who is new to programming I am still struggling with doing things
between windows.  The namespace issues give me a lot of trouble.  Robin Dunn
had a good response on 30 Nov about transferring data between a dialog and a
frame.  I was wondering about calling methods from a different class.  I
have a dialog that I want to do several things on a notebook page but I
can't seem to find the right way to do it.

So far I've tried calling the method using the instance names for the
notebook page's class.  This ends up looking like "
app.frame.nb.page3.UpdatePage()."  I get an error saying 'app' is unknown.
I've also tried called .GetTopLevelParent() but this apparently is the
dialog itself; no parent I guess.  I read in the book about finding windows
by their id, name or label but I'm not sure how to do this.  I've messed
around on PyCrust with passing instance names to other classes in order to
call their methods but doing this in a GUI environment is difficult for me.

This subject seems like a good one for a tutorial.  Is there one out there I
am missing?

Thanks for the help.

Mike Barron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200712=
06/07c4e3fe/attachment.htm


More information about the wxpython-users mailing list