--
Dr.Sarayu Balu,M.D.,FAAP Tel.(802)888-2448
Ryder Brook Pediatrics,
P.O.Box 608, Morrisville, VT 05661.
An easy way would be to use the command
regexp {^\{?([^\}]*)\}?$} $payer all payer
To extract the enclosed string. Note that it's safe even if the {}'s
aren't there.
This does nothing to address the fundamental difference you found, it
just patches the problem for you.
_Tim
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tim J. Edwards Motorola, Inc.
ph: (512)794-4343, fax: 4793 5918 W. Courtyard Dr., Suite 330
edw...@adttx.sps.mot.com Austin, TX 78730 USA
pager: 5165399.skytel@pagegate Internal Mail: TX73-F30B
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sarayu balu (sb...@nyx.cs.du.edu) wrote:
: I have a situation where I do a '[selection get]' in a list-box
: and send a sql-query - "select .......... where name = '$payer' "
: $payer is gotten from the selection. On tcl7.3, I seem to be
: getting the $payer instance surrounde by { }, like {MIKE GAGNON}.
: I tried everything to get rid of the braces and am not able to
: do it. All I want is 'MIKE GAGNON' and not '{MIKE GAGNON}'.
: Everything works OK in tcl7.4 and I cannot update tcl7.3 to 7.4.
: What do I do ?
: Thanks for any suggestions.
: -SBalu
:
Krishna
The listbox get returns a list of entries!
So use:
[lindex [$listbox get $index] 0]
To get first (and only) entry
Henning Godske
NetMan A/S Denmark
try treating the result of selection get as e list:
set $payer [lindex [selection get] 0]
or something like this.
It should work, but I don't know why it happends
bye
--
Sigismondo Boschi
net...@comune.bologna.it
PhD student at the Physical Chemistry Department
Bologna University (Italy)