RE: Hidden Columns in Gtk::TreeView

Didn't realize, or remember that it needed a copy constructor. My class
not have one, so that was probably the root of my problem. I do have an
operator overload, so a copy constructor would be trivial. 

thanks for the advice. 

It does work fine with the void *, but also introduces some additional
type casting
that needs to be done in several other places, such as whenever you
want to access
the information stored there! 

-----Original Message-----
From: Murray Cumming [mailto:murrayc murrayc com] 
Sent: Wednesday, February 22, 2006 5:24 PM
To: Huston, Bob
Cc: Nathan Hüsken; gtkmm-list gnome org
Subject: RE: Hidden Columns in Gtk::TreeView

On Wed, 2006-02-22 at 15:39 -0500, Huston, Bob wrote:
> I have done this exact thing, I think the tree view will only allow
> a certain number of types to be columns, the way I got around what
> are
> seeing is add the column as a void *, then type cast a ptr to my
> to go into the column.

That shouldn't be necessary. Any type that has a copy constructor can
used. And if it doesn't have a copy constructor, you can use it via its
specific pointer type, or via a smartpointer, such as boost's shared

Murray Cumming
murrayc murrayc com

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