[Java-gnome-developer] Re: Problems with TreeView
Brought to you by:
afcowie
From: Tiago C. <cog...@li...> - 2003-11-17 10:18:08
|
On Seg, 2003-11-17 at 09:14, Tiago Cogumbreiro wrote: > Apparently something got broken from 0.8 to 0.8.1 in what regards to the > TreeView component. > Considering the following defenitions: > DataBlockInt dataIndex = new DataBlockInt(); > DataBlockString dataName = new DataBlockString(); > DataBlockBoolean dataExtract = new DataBlockBoolean(); > ListStore list = new ListStore(new DataBlock[]{dataIndex, dataExtract, > dataName}); > > While this still does not work properly (without showing a warning): > // To get wheter or not the item is selected > TreeIter i = list.getIter(String.valueOf(index)); > return list.getValue(i, dataExtract); > > Now this does not work too: > // Now to get the name of the item > TreeIter iter = list.getIter(String.valueOf(index)); > return list.getValue(iter, dataName); > > This used to work before, now i feel obligated to have a java copy of > the names in a List as i already do for the boolean field (extract or > not), getting these fields from the treeview generates the following > error: > > (java-gnome:29591): GLib-GObject-WARNING **: gvalue.c:86: cannot > initialize GValue with type `gchararray', the value has already been > initialized as `gchararray' > > I am going to try to find out through the diffs what broke this and > maybe we can get the bolean value to work too. > > Tiago Cogumbreiro As you might've guessed the problems are with ListStore and not with TreeView, sry ;) |