[java-gnome-hackers] Tree/List widgets
Brought to you by:
afcowie
From: Mark H. <mh...@ti...> - 2002-08-23 17:04:35
|
hi, I've been working on these widgets. My initial aims were to implement the minimum methods required to get something to work. I have implemented these and written examples/gtk/tree/TreeExample.java to demonstrate them. Unfortunately, I am having trouble to get this to work. In order to get this far, I had to make a few changes to some glib classes: Type: renamed the jni ...get_STRING method to getSTRING in both the java and c files. (This will also have to be done with the other types) Value: Added temporary methods for assigning values to the object. The offending line in my test app appears to be: Value val = new Value( Type.STRING() ); and in Value: public Value(Type type) { int [] vptr = new int[1]; Value.g_value_init(vptr, type.getHandle()); handle = vptr[0]; } I've attached the full java output. I don't think the iter != null assertion is relevant to this particular error (the iter isn't involved in the value). However, it too is a strange error. There is no way of creating a new TreeIter. list_store_append should create and return the iter. Also, on a different note, How do I get access to the properties of the objects (I don't really know much c). Take GtkCellRendererText for example; This has no get/set methods, but has many read/write properties. I assume something has to be added to the jni files. -- +----------------------------------------------+ | Mark Howard cam.ac.uk mh344@ | | http://www.tildemh.com tildemh.com mh@ | +----------------------------------------------+ |