in reply to Re^2: Sorted lists in Tk
in thread Sorted lists in Tk
Yes. MListbox is a widget that is built from several Tk core widgets. MListbox consists of no C code itself, and generally relies on its subwidgets to "do the right thing" when it comes to freeing memory that is no longer required.
Each sort operation essentially deletes all data from each Listbox (Column), and then loads each Listbox again with the data once it has been sorted. So, as you can imagine leaks in Listbox are obvious very quickly.
Tk::TextList is a widget that was created several years ago to emulate the functionality provided by Listbox (method calls, look-and-feel, etc), but to give it the power of Text widget tags. In theory, this gives TextList the ability to create and apply styles (tags) at a much greater granularity (per character) than even HList, though, I think the current set of methods support a per-item configuration.
You should be able to plugin TextList every where there is a Listbox call, and it should work, but now that I think about it, there may have been one or two issues with it that I'm not sure if I ever released fixes for. Feel free to experiment with it. I'm going to look at it again as well.
If you have the time to devote to it, I definitely encourage you to experiment with HList. I've also used it for similar purposes in the past, with a reasonable amount of success. Whenver I did, however, I always had this nagging feeling that I was using it to solve problems that it wasn't really created to solve.
|
|---|