[Java-gnome-developer] Weird TreeModel / TreeView behaviour
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2004-12-15 12:46:02
|
Hey, I've been experimenting with the TreeModel / TreeView APIs, and came across something strange. I've attached some example code. The CLASSPATH is correct for where the [my] Gentoo ebuilds put the jars and .sos, but other than touching up that it should just work if you type `make java` or `make native` The specific thing I was testing was the ability to generate more than one GtkTreeView based on a single underlying GtkTreeModel. The strange behaviours I want to note are: 1) When you sort in one window, the other window is affected. Run the program. You get two windows. There are three data columns; each window (a TreeView) has two of them only. Click on a header, which activates it as a sort column. That set of rows sort. SO DO THE ROWS IN THE OTHER WINDOWS. Huh? Aren't the views supposed to be separate? Is there some mismatch / object identity violation somewhere between the Java layer and the underlying GObject layer? 2) When you close one window, the event isn't propagated to the LifeCyleListener until the other window is also closed, when both events show up. Try it. X close or Alt-F4 close one window. The way the code is, that should cause an event, which calls Gtk.mainQuit, which should cause the app to exit. That doesn't happen right. I'm not sure that either of these are RC bugs, but they are certainly anomolous. I'd appreciate it if people could try this and let me know if they're having the same behaviour. If you are, then we have some things we need to track down. AfC Sydney -- Andrew Frederick Cowie OPERATIONAL DYNAMICS Operations Consultants and Infrastructure Engineers http://www.operationaldynamics.com/ Sydney: +61 2 9977 6866 New York: +1 646 472 5054 Toronto: +1 416 848 6072 London: +44 207 1019201 |