Re: [java-gnome-hackers] Thoughts about TreeStore
Brought to you by:
afcowie
From: Vreixo F. L. <met...@ya...> - 2008-03-24 00:19:00
|
> So here's the question: when you get a ROW_EXPANDED > event, do you need > to point at a row [ie call model.getValue() with it] > or do you then need > to iterate over the model? good question! I think iteration from a arbitrary row is not an use case. Usually you catch ROW_EXPANDED just to get some of the row values (i.e calling model.getValue()). But the question is: is that a problem for us? Can we assume the user is not going to iterate, and thus leave model to null? In my opinion this is a bad solution, because in that case we have a set of TreeIter methods that sometimes work, sometimes not! It is hard for the developer to figure out in which situations it is valid or not, even if we carefully document that. In my opinion, we should try to keep the same behavior for all iterators, despite of where they come from. Anyway, it is not hard to achieve, it is implemented in my branch! And note that other methods that need the model, such as children(), are really useful in a ROW_EXPANDED handler, so... Cheers, Vreixo Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento! http://br.mail.yahoo.com/ |