[Glade-users] segfault on gnome_app_set_contents
Xavier Bestel
xavier.bestel@free.fr
14 May 2003 23:39:20 +0200
Le mer 14/05/2003 à 21:33, Damon Chaplin a écrit :
> On Tue, 2003-05-13 at 14:32, Xavier Bestel wrote:
> > I instantiate the GnomeApp, and if I do:
> > gnome_app_set_contents(GNOME_APP(appwindow),
> > glade_xml_get_widget(glade_xml_new("xav.glade", "dummylabel", NULL),
> > "dummylabel"));
> >
> > everything works. But if I replace "dummylabel" with "vbox1", I get a
> > segfault (pasted at the end of the mail).
>
> You should remove vbox1 from its original position first, before adding
> it to the GnomeApp. I'd guess that is causing the problem.
What do you mean by "removing" ? If I understand what's explained here:
http://developer.gnome.org/doc/API/2.0/libglade/libglade-embedding.html
glade_xml_new("xav.glade", "vbox1") should only create a widget
hierarchy starting from vbox1.
Or, stated otherwise: why is it working with "dummylabel", or like in
the example in the libglade doc ?
How do I remove vbox1 if it has no parent ? Or perhaps I didn't get the
concept of glade_xml_new() ?
Xav