This as come up several times before ( albeit in rather different form...),
so please excuse the rather terse reply... (Not much time either]
Check out wxPyTypecast, near the end of wx.py ...
Cheerio, Chris
···
-----Original Message-----
From: wxpython-users-admin@lists.sourceforge.net
[mailto:wxpython-users-admin@lists.sourceforge.net]On Behalf Of
nw_moriarty us
Sent: Thursday, 28 September 2000 4:21 AM
To: wxpython-users@lists.sourceforge.net
Subject: [wxPython] grandparent
I have a wxScrolledWindow with wxPanel as a child which has a
wxPanel as a child. When I get the grandparent of the last panel I get
<C wxWindow instance at _8380e18_wxWindow_p>
but if I ask the grandparent itself I get
<C wxScrolledWindow instance at _8380e18_wxScrolledWindow_p>
Also, the attributes of the class (lists I created of children)
that created the window are only available in the second case.
Nigel
------------------------------------------------------------
--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.
I have a wxScrolledWindow with wxPanel as a child which has a wxPanel as a
child. When I get the grandparent of the last panel I get
<C wxWindow instance at _8380e18_wxWindow_p>
but if I ask the grandparent itself I get
<C wxScrolledWindow instance at _8380e18_wxScrolledWindow_p>
Also, the attributes of the class (lists I created of children) that
created the window are only available in the second case.
This is a common problem in wxPython that I hope to find the time someday to
solve. In the meantime you can either use wxPyTypeCast as has been
mentioned already, or just keep references to your objects yourself.