Re: [gtkmm] Segfault at changing button label



On Thu, 2002-07-04 at 13:23, Jeffrey Rush wrote:
> 
> 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!

I know it's a bother, but if you don't get an answer then you can
improve your chances of somebody investigating it properly by providing
a simple compilable reproducable example of this and adding it to
bugzilla.
-- 
Murray Cumming
murrayc usa net
www.murrayc.com




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