[gme-users] Java BON interface question and wishlist
Brian Williams
BrianW at isis.vanderbilt.edu
Wed Apr 7 10:36:19 CDT 2004
Hi Gabor,
I like the idea of Object getAttributeAsObject(String name) throws
NoSuchAttributeException
The original form of the JavaBON could maybe be blamed on C/C++
programmers replicating a C++ interface in Java. I will add the
getAttributeAsObject to the BON. I'll also try to fix the Atom in root
folder problem. I'm not sure about dropping "J" from the name, although
it's just a search and replace, it may cause some new bugs to pop up if
not done thoroughly.
The rest of your questions will have to be answered by Papszi or Gyorgy,
the real Java experts (and authors of the MGA layer and
JavaComponentRegister dialog)
Brian
-----Original Message-----
From: Gabor Szokoli [mailto:szokoli at ps.uni-sb.de]
Sent: Monday, April 05, 2004 3:33 AM
To: gme-users
Subject: [gme-users] Java BON interface question and wishlist
Hello!
I'm trying to use the Java BON interface, but I'm no good at it, I can't
even get the values of attributes:
getAttribute returns false no matter what I do.
I give myself 99% chance to be wrong, and 0.9% to you guys comparing
strings using the == operator instead of the equals method somewhere.
:-)
Thanks for any ideas, see attached meta, instance, and interpreter
source for a "Hello World" example...
And here's my wish list so far, you may fulfill it in any order you like
:-))
I suppose some of the things I'm missing are probably there already, but
I can't find them:
Java BON interface:
-Ensure availability of org.isis.gme (what's wrong with
edu.vanderbilt.isis.gme anyway? All letters legal, unlike us...)
packages independently from the value of the $CLASSPATH environment
variable.
-Consider using Integer instead of int, and some abstract supertype for
containers instead of the current implementation (java.util.Vector) in
the interface.
-You could use exceptions or the null value instead of "error codes" to
get rid of "pass by reference":
Object getAttribute(String name) throws NoSuchAttribute
and then people can cast for themselves, or
Integer getIntAttrib(String attribName)
String getStringAttrib(String attribName)
...
-It does not seem possible to reach in-root-folder atoms from the
JBuilder.
(Why would I do that? To make the simplest, non-recursive "Hello World"
model :-) )
-Could you please, pretty please drop the "J" prefix from class names?
JavaComponentRegister dialog:
-Add file selector to "classpath" field, make resiliant to M$ directory
layout fsckups like spaces in directory names.
-A "Validate" button?
-We would need to feed command line options to the JVM running the
interpreter for bytecode from the Scala compiler, could you add a
textfield for that? (we could hide and wrap the real java.exe, but that
would look odd in deployments :-) )
Other people might need this feature for logger configuration, memory
options, profiling, etc.
Java interpreter execution:
-The thread responsible for redrawing the GME GUI seems to be blocked
during java interpreter execution?
-Interpreter stdout and stderr output seem to be lost, they would look
nice in the log.
That's all for now :-)
May the Unholy Ghost of C programming take longer and more frequent
coffee breaks from haunting your poor skulls!
More information about the gme-users
mailing list