Re: [gtkmm] Using classes derived from gtk



On Fri, 2004-07-02 at 12:03 -0400, Miller, Ryan D wrote:
> Probably more of a programming question that a Gtk question, but how
> do I call the base class member functions from a derived class?  In my
> context, I've got a browserTree (displays directory trees) derived
> from a Gtk::TreeView.  In my constructor for browserTree I'm trying to
> set the model using the set_model function, just calling set_modal
> (refTreeModal) gives me the errors:

That should work fine.

> /usr/include/c++/3.3.3/bits/stl_alloc.h:656: undefined reference to
> 'VTT for browserTree'

I guess that this has some different cause.

> this->set_model also gives me the same error

TreeView::set_model(whatever) is that you would do if you really wanted
to specify a method in a certain class.

> Is there something special I need to do, or am I missing something
> basic?  (I'll attach the code if needed)
> 
> It might be worth mentioning I'm using glade

I think you mean "glademm" which generates code. You might want to
consider libglademm if you don't know about it already.

>  so browerTree is actually first derived from browserTree_glade which
> comes from TreeView.  I think the problem is in how I'm calling
> though, not glade, which is why I'm asking here.

-- 
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]