Re: Parent <--> Child and header files
- From: "B.Hakvoort" <bart hakvoort be>
- To: gtkmm-list gnome org
- Subject: Re: Parent <--> Child and header files
- Date: Sun, 21 Nov 2004 12:58:55 +0100
On Sun, 2004-11-21 at 11:38 +0100, Mateusz 'vArDo' Bilinski wrote:
> I solved the problem in my way :D (but I'll try yours, although I still
> don't know how can I get pointers to object methods if I don't know a
> class prototype ;/).
>
You cannot and you don't have to... As i understand it you only want to
set some text in a statusbar. So the only thing you have to do is
sending some text as an argument of the signal.
You really should take a look at the examplecode in the gtkmm tarball.
Using signals is so much cleaner then passing pointers to objects
around.
General approach would be..
- declare public signal in childclass
- connect childclass.signal upon instantion of childclass with
statusbar.set_text. this connecting is done in the parent!!
- whenever you want to set the text, you simply call signal.emit
("hello") from within the childclass.
Something like this..
best regards,
Bart
--
www.titanium-it.nl --- Open Minded Open Source
www.heavenisopen.com <-----Another Source
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]