Re: populating a TreeStore in reverse order



On Wed, 2005-06-22 at 14:16 +0200, The Saltydog wrote:
I already did this way into an hash, then sorting the hash and
populating the treestore directly. The only matter is that I have
first to wait for hash completion (it is very long, more than 10000
rows) and only then show the treeview..

It would be nice to populate the treeview in real-time, while getting
the data, so the user should start viewing something while waiting...

It's not what I meant, I meant keep all the data in a perl array/hash,
and use a custom store that get the data from the perl array/hash.
That way you don't have to fill the store, the data are already there.
It's much more complex but it can fit your needs, I use it with a list
of 15000 rows, and creating/displaying the treeview is really fast on a
duron800 :).

But my first solution could work: you load data until you have a full
branch (starting from depth 0), then prepend the root of the branch to
the store and fill this branch, load next branch ...
It depends on what kind of data you have.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]