Re: Two warnings when creating a TreeStore



On Wed, 2007-09-12 at 11:59 -0400, Jos�lburquerque wrote:
[snip] 
> When you say a 
> static instance, are you referring to one of my "Element" derived 
> classes or are you referring to the TreeModelColumnRecord class I've 
> defined (columns) which *is* static within my "DVDProject" class?  Would 
> changing the "staticity" of this static member help?

Yes, that's the problem.

> On another note, can I pick your brain a bit more and ask you a little 
> about how gtkmm handles inheritance?  As I had mentioned, all the 
> objects I work with are derived from a base class (which I call 
> "Element") with a virtual method called "getName()" designed to return a 
> string naming the object I'm dealing with (so I can "render" the string 
> in the TreeView).  I've overridden the method in various derived 
> classes, but in a rendering method (which I set up with the 
> TreeView::Column::set_cell_data_func()) when I call the object's 
> "getName()" method, it's overridden method is not called, but instead 
> the base class method is called.  Am I missing something?  If it helps 
> the short TreeView initialization and the rendering method I use 
> follows.  I'd really appreciate any insights.  Thanks for your comments.
[snip]

gtkmm doesn't change anything about how C++ does inheritance. 

You should maybe check that your instance is really an instance of the
class that you expect.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com




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