GNOME Bugzilla – Bug 301239
Cannot read DataColumnObject value from ListStore model
Last modified: 2009-08-15 18:40:50 UTC
Version details: 2.6 Distribution/Version: Debian Sid 1. Create a listStore with a model that contains a Text and Object DataColumn 2. Execute the code below Expected result would be that the second System.out.println would also output the String returned by toString() inside `obj`. Instead, it does not :-) /** * Insert value into list * * @param obj */ public void add(Object obj) { System.out.println("Adding: " + obj); TreeIter iter = model.appendRow(); model.setValue(iter, lbColumns.text, obj.toString()); model.setValue(iter, lbColumns.object, obj); System.out.println("Adding object to model:" + model.getValue(iter, lbColumns.object) + "/" + model); } Execution of this method yields the following result: Adding: objecttoStringOutput Adding object to model: null / org.gnu.gtk.ListStore@1f20eeb
You can find some test code here: http://linux-box.nl/~marnix/zooi/object-liststore-bug.zip Cheers, Marnix
The problem is a bug in Value class.
*** Bug 313152 has been marked as a duplicate of this bug. ***
In which version of gtk-java is this fixed?