GtkTree row.set_value does not work
- From: "Luis A. Montes" <luis montes qdusa com>
- To: gtkmm-list gnome org
- Subject: GtkTree row.set_value does not work
- Date: Wed, 09 Feb 2011 14:19:17 -0800
Hi there,
I used glade 3.6.3 to generate a UI for an application. Everything works
nicely except for a TreeView that I have. I got to the Tree View Editor
and assigned Text Cell renderer to gchararray columns that I have. In my
C++ code I have the following piece of code:
using namespace Gtk;
using namespace Glib;
RefPtr<Gtk::Builder> builder;
...
RefPtr<TreeStore> tree_store =
RefPtr<TreeStore>::cast_static(builder->get_object("MyTreeStore"));
TreeView *pView;
builder->get_widget("MyTreeView", pView;);
RefPtr<TreeModel> pModel = pView->get_model();
TreeStore::Row row = *(tree_store->append());
row.set_value<gchararray>(0,"something");
I can check all pointers/references are valid, and the row gets added
(cause if I add a child to it I can see the + to expand children) but
set_value throws a GTK-WARNING to the console and does not set anything:
Gtk-WARNING **: gtktreestore.c:765: Unable to convert from
glibmm__CustomPointer_char++ to gchararray.
I've tried to use the other version of set_value, but that's a bit
trickier given that I used glade, so I don't really have the model
columns. Google does not seem to return anything on this error. Any
pointers are appreciated. I'm not a frequent user of Gtkmm, but I'm
trying to use it a bit more ...
Luis
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]