[tcljava-user] Converting java array to a tcl list for use with lsearch.
by PFinnegan other posts by this author
Oct 28 2005 1:54AM messages near this date
[tcljava-user] java::cast with array signature.
|
Re: [tcljava-user] Converting java array to a tcl list for use with lsearch.
The java.util.Set interface does not have an array signature. I converted
the Set collection to an array using the Set.toArray method and accessed
the array with the javaArrayObjcommand set.
Is there an easy way of converting a java array to a tcl array that can be
used with lsearch.
For example:
set iteratorI [ $serverSet iterator ]
set arrayI [ $serverSet toArray ]
puts "\n serverSet array length [ $arrayI length ] \n"
*** set tclList [ convert $arrayI ]
Then use regular tcl commands.
lsearch $tclArray xxx
foreach i $tclArray { puts $i }
Regards.
PATRICK FINNEGAN.
===================================================
HBF Health Funds Inc. a registered organisation under the National Health Act
HBF Insurance Pty Ltd ACN 009 268 277
This email is a confidential communication intended only for the named Addressee(s).
If you are not that person any disclosure, copying, distribution or use of this email
or the information in it is prohibited. Please notify us immediately by
telephone, (+61) 08 9265 6111 or return email and delete this email.
The views in this email may be personal to the author and not those of HBF.
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
tcljava-user mailing list
tcljava-user@[...].net
https://lists.sourceforge.net/lists/listinfo/tcljava-user
Thread:
PFinnegan
Tom Poindexter
PFinnegan
|