Re: Programmer's criticism of GTK2



Jonathan Blandford wrote:

There's no conceptual reason this should be the case.  GtkTreeModelSort
keeps lots of iters around, and survives all sorts of mutations.  What's
the error.  Are you sure you aren't deleting the second iter as well?

The problem is in GTK. If I want to access to rows fast that I need to store iters, but all stored iters become invalid after any change of the model! I DO NOT UNDERSTAND
WHY GTK2's List/Tree model  REALISED IN SUCH INCONVINIENT WAY. E.g. if in my
application I use list,trees, hashes or anything else then I just store pointers to the nodes and use them everywhere in my program. Of course I cannot use pointer after freeing but I can use another (not freed yet) stored pointers without problems. Of course I understand that due storing all ListStore data in GList GTK2 can't allow use iterators after changing list structure. VALID WAY IS STORING LIST DATA INSIDE ROW
STRUCTURE!!!!
Now:
GList -> ROW
|
GList ->ROW
|
GList->ROW
|
....

Valid way:
ROW
   |
ROW
   |
ROW
   |
....



-Jonathan









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