"$w get 0 end" *does* always return a list of items, which is a list of
lists (see the reference manual). This is valid also if the tablelist
contains only one row (in this case the result list has exactly one
element, which is the only item of the tablelist). Hence your code
doesn't need an additional "if" at that place!
"$w get $idxs" returns a list of items or just one item, depending on
the number of indices in $idxs. This is the documented behavior, which
has the minor drawback that one might need an "if {[llength $idxs] ==
1}" check. On the other hand, this rule comes in handy if you want to
get exactly one item, say, for index = 10, because in that case you can
just write "set item [$w get 10]".
--
Csaba Nemethi
http://www.nemethi.de mailto:
csaba....@t-online.de