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" );

Would I have to do an equivalent "rename rect20 {}" when I called

                tclObject.release();

> 
> % 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 {}
> % unset o
> > > 

----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe:    send mail to [EMAIL PROTECTED]  
                 with the word SUBSCRIBE as the subject.
To unsubscribe:  send mail to [EMAIL PROTECTED] 
                 with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'. 

Reply via email to