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>) ?
I know there is a toString() method, but that converts the entire list to
a string, so it prints out the {} around the actual elements that I would
like to print out. For example, my list looks like
{ {file open] {edit copy} {tools options} }
This list is passed into my cmdProc method as a TclObject argv[] object.
If I do assign argv[1].toString() to a String object in Java, and then
try to print out that String object, I get :
{file open} {edit copy} {tools options}
What I would like to get instead is:
file open
edit copy
tools options
all as separate string objects, so that they can be printed separately.
Any help would be appreciated.
Thanks.
----------------------------------------------------------------
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]