My travails today in trying to display values on two different notebook
tabs made me realize that I don't really understand when wxPython objects
instances are created.
My application retrieves data from database tables and displays those data
when it is invoked. The widgets are properly loaded with text and numbers,
so I assumed that each page instantiated the class as data were loaded.
However, that's apparently not the case.
What I'm trying to do is to take instance variables displayed on widgets
created by module1.class1's __init__() method, and also display those same
values in variables in module2.class2. As the application loads, it fails
when module2.class2 tries to place those values in wx.TextCtrl() widgets.
I'd appreciate learning just when the application-specific instances are
created.
Rich
···
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerators(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
My travails today in trying to display values on two different notebook
tabs made me realize that I don't really understand when wxPython objects
instances are created.
My application retrieves data from database tables and displays those data
when it is invoked. The widgets are properly loaded with text and numbers,
so I assumed that each page instantiated the class as data were loaded.
However, that's apparently not the case.
What I'm trying to do is to take instance variables displayed on widgets
created by module1.class1's __init__() method, and also display those same
values in variables in module2.class2. As the application loads, it fails
when module2.class2 tries to place those values in wx.TextCtrl() widgets.
I'd appreciate learning just when the application-specific instances are
created.
The Python and C++ instances are created when you create the object in your code, however on wxGTK the UI portion of the widget may not be fully created until it is "mapped" to (made visible on) the screen. What specifically are you having troubles with?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
The issue that raised this question has been resolved. I recognized that I
was trying to fit a square peg in a smaller round hole, so I backed up and
approached the problem properly. It's all working well now.
Thanks,
Rich
···
On Fri, 28 Sep 2007, Robin Dunn wrote:
The Python and C++ instances are created when you create the object in
your code,
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerators(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863