The problem is that the code assumes

  set dataList [makeTclList $content]

sets the variable 'dataList' to the "TclList object" returned by your
MakeTclList command.  Suppose that the Tcl interpreter makes a copy of the
list returned by MakeTclList using its string form.  Then your original list
would be free'ed by the interpreter.  This results in the Java objects
inside the list to also be free'ed.  Later on, TclBlend will not be able to
map "java0x3" to any real Java object, resulting in the 'invalid command
name' error.

I have encountered this error in my use of TclBlend.  One of my earlier
email demonstrates this behavior:

-----Original Message-----
From: Jiang Wu [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 23, 2000 10:28 AM
To: [EMAIL PROTECTED]
Subject: [Tcl Java] A Tcl or TclBlend problem?

This problem may be related to Dr Wes Munsil's problem on "invalid command
name".  Here is the problem script:

    set x [java::new String foo]
    after 1000 "$x toString"
    unset x
    update

You will get an error "invalid command name".

-- Jiang Wu
   [EMAIL PROTECTED]

----------------------------------------------------------------
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