> > Care to submit some docs patches? We could also use some "Tcl/Java
> > in action" examples. Nice little examples that do something
> > cool and show how to use the java::* commands would really
> > be great. Would anyone be able to help with that?
> 
> Well, I won't be the right person to write up on the java::* commands.
> Sadly, I can't get java::* commands to play nice with my Tcl scripts.  So
> all I know is how it does not work :(

You are using Tcl blend and Tcl loaded into a JVM right? I get the
feeling Tcl does not know how to find its startup scripts. What
happens when you do a "package require java"? This is strange
because I was able to use the java::* commands just fine
from inside a JVM that loaded Tcl Blend (see that example
.java file I just posted).

> I am using the "traditional way" to integrate between Java and Tcl through
> the "Command" interface.
> 
> > I think we need to change Tcl to support "locked down"
> > internal reps to really fix this. Everything else is
> 
> Is that realistic in the near term?  The java::lock seems promising as a
> short term solution for some cases.  Is there a way to create a reflect
> object and lock it as an atomic operation in Tcl?

Depends on what you mean by "near term". I don't think we would
be able to get a change like this into 8.4. Tcl 9.0 seems
to be the place to do it. Jeff seems to be coming around to
the idea of opening up the Tcl development process and
using a "stable" and "development" tree model (see comp.lang.tcl)
like we do for Tcl/Java.

>       set x [java::new -lock String foo]
> 
> Otherwise, it may not work.
> 
>       set x [java::new String foo]
>       java::lock $x                   <--  may or may not work

I don't see why you think that "may or may not work".
That should always work. You could also call is like so:

set x [java::lock [java::new String foo]]

That would do the exact same thing, so I think using two
commands is better from a readability standpoint.

Mo DeJong
Red Hat Inc

----------------------------------------------------------------
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]'. 
An archive is available at http://www.mail-archive.com/tcljava@scriptics.com

Reply via email to