The reference manual clearly defines tablelist items as *lists* of
elements. When you insert an item and then retrieve it by passing just
one index to the get subcommand, then the return value will be (just
like the inserted one) a list and should be treated as such.
Of course, if the widget has just one column and you insert an item
consisting of two or more elements, then the item in question will be
truncated after its first element and the resulting one-element list
will be inserted in place of the original one. On the other hand, in
the most common case that the number of elements of the original item
equals the number of columns, exactly this number of elements will be
inserted at the specified row position.
Tablelist widgets behave really very much like Tk core listboxes. But,
due to the definition of tablelist items as being *lists*, this similar
behavior cannot be completely identical. IMHO, this is by no way a
"major bug in tablelist", but a quite logical consequence of the
difference between the notions of string and list. In addition, there
is no place in the documentation stating that you can "use the same code
across the two widgets". The scripts will be very similar, but they
cannot be identical!
--
Csaba Nemethi
http://www.nemethi.de mailto:
csaba....@t-online.de