newbie: call a function of a parent widget

Hi

I wanted to call a function of a parent widget.
My first try was to GetParent(), but this returns a pointer to the widget.
How can i than call the function?

self.GetParent().<function>() doesn't work.

My solution is to save th eparent in self.parent at initialisation of the
widget. This works but i think GetParent should work to, but i don't know
how to call a functino of a pointer, like '->' in c/c++

Mirko

···

--
Mirko Koenig VIT Proz. http://www.v-i-t.de

homepage: http://koenig.v-i-t.de
ICQ: #11181751
e-mail: koenig@v-i-t.de

Without chaos, there is no need to be orderly

You have hit on a fundamental problem that Robin is at least one step of two
towards solving. Take a look at the OOR section in the Misc in the demo for
more.

Nigel

···

----- Original Message -----
From: "Mirko Koenig" <koenig@v-i-t.de>
To: <wxPython-users@lists.wxwindows.org>
Sent: Thursday, December 05, 2002 11:35 AM
Subject: [wxPython-users] newbie: call a function of a parent widget

Hi

I wanted to call a function of a parent widget.
My first try was to GetParent(), but this returns a pointer to the widget.
How can i than call the function?

self.GetParent().<function>() doesn't work.

My solution is to save th eparent in self.parent at initialisation of the
widget. This works but i think GetParent should work to, but i don't know
how to call a functino of a pointer, like '->' in c/c++

Mirko
--
Mirko Koenig VIT Proz. http://www.v-i-t.de

homepage: http://koenig.v-i-t.de
ICQ: #11181751
e-mail: koenig@v-i-t.de

Without chaos, there is no need to be orderly

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

Mirko Koenig wrote:

Hi

I wanted to call a function of a parent widget.
My first try was to GetParent(), but this returns a pointer to the widget.
How can i than call the function?

self.GetParent().<function>() doesn't work.

My solution is to save th eparent in self.parent at initialisation of the
widget. This works but i think GetParent should work to, but i don't know
how to call a functino of a pointer, like '->' in c/c++

This looks like too old version of wxPython. I have no problems with 2.3.3

Niki Spahiev

Mirko Koenig wrote:

Hi

I wanted to call a function of a parent widget.
My first try was to GetParent(), but this returns a pointer to the widget.
How can i than call the function?

self.GetParent().<function>() doesn't work.

It should. What version of wxPython are you using?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!