[Java-gnome-developer] Thanks and some questions
Brought to you by:
afcowie
From: Mark W. <ma...@kl...> - 2003-06-29 17:50:22
|
Hi, Thanks for the java-gnome bindings! It was very nice to extend my program with a simple GUI frontend that makes it look, feel and integrate with the rest of my desktop. Thanks very much! See <http://www.klomp.org/snark/snark-gnome.html> for the result. Some questions and suggestions. Since this is my first Gnome program please feel free to point out any mistaken assumptions. I used the java-gnome packages that came with Debian GNU/Linux (unstable) 0.8.0cvs20030415-1. I tried to get a more recent version but anonymous CVS just doesn't seem to work on sourceforge (I have had problems with other projects on sourceforge as well). So please tell me if the problems I encountered are already known or fixed in a next release. The documentation on the home page seems very outdated. But using the the general gtk and gnome API reference and the examples it wasn't very hard to understand how to create the simple GUI that I needed. Having those simple examples really helped getting up to speed quickly. java-gnome doesn't seem to work with kaffe (not even the just released 1.1 version). I have already emailed the kaffe mailinglist but haven't had time to investigate more. It does work very nicely with gij (GNU Interpreter for Java) that comes with gcc 3.3 and that handles traditional class and jar files. I haven't tried compiling everything to native code using gcj (GNU Compiler for Java) which does work very nicely for the command line version of my program. I noticed that there is also a gnome-gcj project <http://gnome-gcj.sourceforge.net> but that doesn't seem to get updated any more. Have the projects merged? Do you want to provide CNI bindings and natively compiled libraries? That should speed things up a bit especially the startup phase and the shared libraries could be used much more efficiently when the user has multiple java-gnome based programs running. The org.gnu.gnome.About class doesn't seem to work correctly. It seems to use the strings that I give it randomly as authors, documentors and translator. I couldn't really detect when it used which string. And if given a null string for the translator it crashes the whole application. In general the library doesn't behave very nicely when calls are made in the wrong order or are given the wrong arguments. Often it wasn't that hard to see what went wrong or when I object should no longer be used but crashing the whole application instead of throwing IllegalStateExceptions makes debugging a bit harder then necessary. An example is using a widget from a window which close box has just been pressed. When using the UIInfo class to get some standard widget like UIInfo.quitItem() when you try to call quitMenuItem.getWidget() before the window that it is attched to is shown it crashes. Is this know behaviour? I couldn't find documentation about how to work with java-gnome from multiple threads. To be save I just created a Fireable and a Timer that sets off a couple times a second and then update the Widgets in the fire() method that checks progress flags set in other threads. What is the recommended way to handle multiple thread that want to update the GUI. When is it save to call a widget or other glib, gtk or gnome object from a thread that isn't the main gtk thread? For the window layout I tried following the Gnome HIG. Is there example code to do some of the things described there? Currently I use alot of VBoxes inside HBoxes with different borders and spacing values tied together with SizeGroups which seems to make it look like the HIG describes. But since every Gnome application implements these kinds of things I wondered if there isn't an example library that just does the right thing. Once again thanks for this binding. Even though I had some troubles, it was not that hard and actually a pleasure to create something usefull. Hope that I can help make it even better. Cheers, Mark |