Re: [Java-gnome-developer] Updating sorted TreeModel
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2008-12-11 09:15:30
|
On Wed, 2008-12-10 at 16:03 +0100, Przemyslaw Wesolek wrote: > I'm having troubles updating TreeModel, which is sorted: whenever I > update a value in the column by which the model (view?) is sorted, the > re-ordering happens and I have no guarantee that all the rows will be > iterated over. Moreover, some rows may be iterated more than once. So this might fall into the category of "putting the wrong TreeModel in the TreeView"? If you're using a TreeModelSort to wrap a ListStore, you put the TreeModelSort into the TreeView. Iterating over the underlying ListStore should, however, remain fine; changes to the sort discriminator won't affect your ability to finish looping over the model. [at least, I've had no problem with it; I did have a case once where the data displayed in the TreeView would wobble a bit as I was updating all the rows because the sorting values were not unique, and so it sometimes flip-flopped a bit when confronted with equal values] Anyway, if you're still stuck you'll need to show us your code (more to the point, to boil your problem down to code that someone can comprehend, or better yet, if it's really a bug, write a TestCase that can go into the test suite). AfC Sydney [If you can't publish your code, then there are other ways of approaching the issue which we can deal with privately] -- Andrew Frederick Cowie Operational Dynamics is an operations and engineering consultancy focusing on IT strategy, organizational architecture, systems review, and effective procedures for change management: enabling successful deployment of mission critical information technology in enterprises, worldwide. http://www.operationaldynamics.com/ Sydney New York Toronto London |