Hello,
> Hi, I have a Tcl List Object that this being passed in as an argument to
> cmdProc method in one of my classes in Java. How do I go about breaking
> up the list into it's elements, and converting them to String so that I
> can print them out using System.out.println(<String>) ?
You can use methods of the TclList class. Example:
TclObject elemv[] = TclList.getElements(interp, argv[1]);
for (int i = 0; i < elemv.length; i++) {
System.out.println(elemv[i]);
}
BTW: The TclList class has its own documentation page in the docs directory.
HTH, Krischan
--
Christian Krone, SQL Datenbanksysteme GmbH
----------------------------------------------------------------
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/[email protected]