Re: How to store a list of strings in Gtk::TreeModelColumn?



On Thu, 2006-04-27 at 09:29 +0400, Igor Gorbounov wrote:
> Hi!
> I'm trying to store a list of strings in a TreeView cells
> in a way like this:
> Gtk::TreeModelColumn<std::vector<Glib::ustring> > list_of_values.
> I need this list of values for futher filling combocellrenderers with them.
> I fill this column cells this way:
> ((std::vector<Glib::ustring> >)(row[treemodel.list_of_values])).push_back("first");
> and so on.
> Nevertheless, ((std::vector<Glib::ustring>

I think this is causing a copy by value. I recommend that you split this
over two or more lines, and explicitly use a reference type. A typedef
will make the code simpler too.

>  >)(row[treemodel.list_of_values])).size()
> returns 0.
> What I do wrong?
> 	Any hint is needed.
> 	Igor Gorbounov
> 
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
-- 
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]