Re: [glade--] get_widget_derived() on indirect base class



On Mon, 2005-04-25 at 12:09 -0500, Rob Benton wrote:
> Murray Cumming wrote:
> > On Sun, 2005-04-24 at 12:39 -0500, Rob Benton wrote:
> > 
> >>I've got a class I've created which is derived from Gtk::EventBox and 
> >>then another class derived from that:
> >>
> >>class Chip: public Gtk::EventBox;
> >>class EditChip: public Chip;
> >>
> >>get_widget_derived() complains that Gtk::EventBox is not a direct or 
> >>virtual base of EditChip.  Is there a way to get around this or do I 
> >>have to inherit from eventbox a second time in my second class?
> > 
> > 
> > What's the actual error message?
> > 
> 
> EditWindow.C: In constructor `EditWindow::EditWindow(GtkEventBox*, const
>     Glib::RefPtr<Gnome::Glade::Xml>&)':
> EditWindow.C:4: error: type `class Gtk::EventBox' is not a direct or 
> virtual
>     base of `EditWindow'

You should call the base class's constructor, not the constructor of the
base class's base class.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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