Re: [gtk-list] Gtk--: Gtk_Dialog with inheritance, virtual functions




On Sun, 6 Sep 1998 Robert_Gasch@peoplesoft.com wrote:
> 
> I have built a Dialog class (D1), that I use as a base class for my other
> dialogs. Usually there is only one level of inheritance (D2). I now however
> 
> have built a class which builds on D2 (D3). In this class (which so far
> is mostly an empty shell), the call to the inherited function
> D1->fillActionArea (which adds the buttons) now results in the following
> error messages being returned:
> 
> ** WARNING **: file gtkbox.c: line 163
> (gtk_box_pack_start): "child->parent == NULL"
> 

The assertion that parent == NULL failed; this means the child you're
packing already has a parent. 

It looks like you are calling fillActionArea in both the parent
constructor and the child constructor. You only need to do it in one; the
child constructor doesn't override the parent constructor, it's run in
addition to it. If that's the problem it's really a C++ issue, not a
Gtk-- one.

HTH
Havoc




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