[tcljava-user] Converting java array to a tcl list for use with lsearch.
Brought to you by:
mdejong
From: <PFi...@hb...> - 2005-10-28 08:52:39
|
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. |