Re: [gtkmm] Segfault at changing button label



Hello Jeffrey!

In the process of cleaning up my mail, I came around this problem
you reported on the gtkmm-list. Just in case you didn't notice:
The bug, whereever it was, has gone! You code works for me with
current cvs.

Regards,

  Martin


Am 04.07.2002 14:23 schrieb(en) Jeffrey Rush:

Hello everyone,

I'm still having troubles when trying to change the label of
a togglebutton. I have following code segment:
...
Gtk::ToggleButton *mytogglebutton = manage(new class Gtk::ToggleButton("Test"));
...
Gtk::Label *testlabel (dynamic_cast<Gtk::Label *>(mytogglebutton->get_child()));
if (testlabel != NULL)
 testlabel->set("New label text");

I get a segmentation fault (debugger 'pointing' to that get_child routine).
What am I doing wrong? Or is there a problem with dynamic_cast?
Thanks for helping!

Bye,
Jeffrey Rush.


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]