Re: [Java-gnome-developer] null returned for Objects stored in a TreeStore
Brought to you by:
afcowie
From: Remy S. <rem...@gm...> - 2005-12-07 02:19:32
|
Hi, Which version of java-gnome are you using? This bug has been fixed before, but it broke again later and was identified and fixed again in August. I have ran your test case on the 2.8 line and I don't have any null pointer problems. Assuming that you're on the 2.6 line and do not wish to upgrade to 2.8, you should probably get the tarball for 2.6.3, which ought to fix your problem. The link is provided below. Of course, if all my assumptions are wrong and you're using the latest from cvs or something of that nature and you're getting this error, it's probably a good idea to file a report to our bugzilla. :) http://research.operationaldynamics.com/linux/java-gnome/dist/libgtk-java-2.6.3.tar.gz Regards, Rem On Wed, 07 Dec 2005 02:18:55 +0100 Lars Weber <la...@di...> wrote: > 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)); } > } > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through > log files for problems? Stop! Download the new AJAX search engine > that makes searching your log files as easy as surfing the web. > DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ java-gnome-developer > mailing list jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |