Re: order of columns in table display

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Wed, 14 Jun 1995 22:02:22 +0200

Hi!

brigittb@flute.candu.aecl.ca (Brigitte Bonert) said:

Brigitte> How does scotty/tkined decide in which order it
Brigitte> displays columns in a table? A mib walk shows each
Brigitte> column in the order it is defined in the mib as
Brigitte> expected a table display doesn't why?

There is a small story behind this mis-feature: When I wrote the code
to display SNMP tables, I tried to get around a restriction in Tk3.6
which did not allow horizontal scrolling of text widgets. So I decided
to split the SNMP table in multiple smaller tables to make sure that
no text widget will get bigger than 120 columns. This ugly code uses
arrays to store information about the column names and their
width. Later I used [array names xindex] to get the column names
back. Hence the ordering is the result of Tcl's hash function. :-)

Tk4.0 will come out soon now (whatever this is) and I think the best
solution is to remove all the ugly code and add horizontal scroll bars
to the LOG windows if needed. The table displaying code (SnmpShowTable
in library.tcl) will be updated in the next scotty snapshot.

Juergen