Tablelist::Tablelist interactive sorting of columns

Tablelist::Tablelist interactive sorting of columns

Post by r_cano » Sat, 10 Jan 2009 15:48:53



I happen to check some old forums mentioning tablelist programmer's
guide. And it was just as simple as sending
{ tablelist::sortbyColumn } to the -labelcommand of the tablelist
widget.

Sorry to bother you guys. I'll be back for some other question.
 
 
 

Tablelist::Tablelist interactive sorting of columns

Post by r_cano » Sun, 25 Jan 2009 10:36:49


This is a follow-up question about sorting.

Does anyone knows how priority is handled by sorting?
For example;

Column1 Column2 Column3 Column4
1 apple boy cat
2 apple2 boy cat2
3 mango girl dog
4 banana other dog
5 banana other2 elephant

if Column1 is sorted, this is clear.
if Column2~4 is sorted, which is next priority?

 
 
 

Tablelist::Tablelist interactive sorting of columns

Post by Csaba Neme » Mon, 26 Jan 2009 04:01:09


XXXX@XXXXX.COM schrieb:



I don't know exactly what you mean. Do you by "priority" mean how the
respective column's elements are compared? This can be specified with
the "-sortmode" column configuration option, whose default value is
"ascii" (see the reference manual for details). Or do you mean what
happens if, after sorting by the first column, the user sorts the items
by the second one (which contains repetitions)? Well, Tablelist uses
the lsort Tcl command, which is a stable sort algorithm, meaning that in
case of element repetitions the order of the equal elements within a
repetition group won't change.

--
Csaba Nemethi http://www.yqcomputer.com/ mailto: XXXX@XXXXX.COM