[Java-gnome-developer] null returned for Objects stored in a TreeStore
Brought to you by:
afcowie
From: Lars W. <la...@di...> - 2005-12-07 01:19:06
|
Hi everyone, while I don't want to be perceived as a nuisance, I just stumbled across another problem: objects I store in a ListStore using setValue(TreeIter, DataColumnObject, Object), are returned as null whenever I try to retrieve them using getValue(TreeIter, DataColumnObject). A test-case is appended below. In my setup it's output is: null Is this a bug or am I doing something wrong? Regards, Lars ---8<--- import java.net.URL; import org.gnu.gtk.*; public class Foobar { public static void main(String[] args) { Gtk.init(args); DataColumnObject object_column = new DataColumnObject(); ListStore list_store = new ListStore(new DataColumn[]{ object_column }); String object = "Foobar"; TreeIter iter = list_store.appendRow(); list_store.setValue(iter, object_column, object); System.out.println(list_store.getValue(iter, object_column)); } } |