Re: Continue flame about WEIRD gtk2 design.



Archit Baweja wrote:

1) There is no any gtk_tree_model_iter_prev() routine for fast access
to previous

I see a gtk_list_store_insert_after() and gtk_list_store_insert_before().
Thats what ur looking for.

Yeah, You didn't understand. I've written about LARGE lists. You have iterator to one element (e.g. it's 100001th element from begin) and you need to get previous iterator.

iterator because gtk-team does not know about double linked lists and
prefer to use
single linked lists.
I you see the header files of gtktreestore.h and gtkliststore.h (the two
GtkTreeModel implementations), you'll see that they indeed are using GList and *not* GSList.

Why need I do it by myself when it can be default implementation?

3) GtkTreePath is UNUSUAL STRUCTURE FOR OUR INCONVENIENCE!!!
I absolutely does not understand WHY WE CANNOT USE ONLY GtkTreeIter
for all operations with model/store!!!
I don't know the exact details on this, but I think there is a GtkTreePath
in addition to a GtkTreeIter because of the GtkTreeStore implementation of
the GtkTreeModel interface. GtkTreePath is usefule for multi-level GtkTreeModel
implementations, like the GtkTreeStore, while GtkTreeIter is only useful for a
single level. I'm not really sure of this one, but I think thats what it is
for.

It's wrong. Iterator is usefull structure (no matter about its internal) to store "pointer to the list/tree-item". As you can understand every list/tree-item has (in valid realisation of course) all links to their neighbours.

4) Why gtk-team always tries to hide normal structures inside *.c
files?! Are they thinking
that another programmers prefer to use expressions like this:
((gtk_supername_of_structure_getting_some_sub_structure_from_another_sub_structure(a,b))->another_sub_routine(c,d))->blablabla
(of course I can expand this expression to
tmp1=gtk_supername_of...;tmp2=tmp1->another_...)


Because there is no "private:" (a la OOPs languages) in C. Data hiding.

It's wrong again. Because GTK+ team thinks that every programmer that uses GTK+
is stupid man(woman) who cannot write programs.
Sorry to all gtk+ developers but when I'was hacking through gtk+1.2.x's code I've always
think: "Why are these clever things hidden from me?".


Hope that helps.
Archit Baweja







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