On Thu, 28 Oct 1999, Thomas McKay wrote:
> How would I do it in Java? This is what I have now...
ACK, NO! Do not call this.getClass() to get the second argument
to the ReflectObject.newInstance() method. You need to use the
actual Java Class object that the instance will be reflected as.
For in
How would I do it in Java? This is what I have now...
tclObject = ReflectObject.newInstance( interp,
this.getClass(), this );
tclObject.preserve();
Would it be as simple as
interp.renameCommand( tclObject.toString(), "rect20" );
Wou
On Thu, 28 Oct 1999, Thomas McKay wrote:
Here is a quick code example:
% set o [java::new Object]
java0x1
% $o toString
java.lang.Object@80d05fd
% rename $o rect20
% rect20 toString
java.lang.Object@80d05fd
The catch is that you need to delete this renamed object like so.
% rename rect20 {}
% u
Well, I was hoping to be able to supply a prefix to use in place of the
"java0x". My average user would understand it more if they saw "rect20" or
"polygon34". I'll poke around a bit and see how hard this would be to add.
I'll try out the namespace commands. I'm not an experienced traditional-