On Sat, 30 Sep 2000, Yinghu Na wrote:
> Hi,
> I have a problem when I run the tclBlend demo
> "watchpkg". I don't know how to pass the parameters to
> the command "swSet", "swStop", "swResume", and
> "swDie". For example, when I type the command "swSet
> java0x1(the returned id# by command "swNew") 10", it
> said " invalid command name "java0x1"". How should I
> fix it?
The trick to that is the need to keep a Tcl variable
with a live ref to the Java object around. If you
do not, the Java GC system will clean up the Java
object behind your back. I updated the README file
for that example, here is what is not looks like.
To add the sw* Tcl procedures, after adding the
StopWatchExtension (as shown above), type
"source swCmd.tcl" at the Tcl command prompt.
to create a new stop watch object and save
a reference to the Tcl object, type:
% set sw [swNew]
To set the countdown time, type:
% swSet $sw 10
Is that more clear?
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