Re: Programmer's criticism of GTK2



Jonathan Blandford wrote:

And again, I repeat myself.  All stored iters of a GtkListStore or
GtkTreeStore should _not_ become invalid after a change in the model.
They're only invalid when the row they point to is removed.

Before writing such statement try to write some code or look inside GTK2!!!!
Look to structure of iterator:

struct _GtkTreeIter{
   gint stamp;
   gpointer user_data;
   gpointer user_data2;
   gpointer user_data3;
};

also look to first strings of
gtk_list_store_remove (GtkListStore *list_store, GtkTreeIter  *iter){
...
   g_return_if_fail (VALID_ITER (iter, list_store));
...

there is apropriate define:
#define VALID_ITER(iter, list_store) (iter!= NULL && iter->user_data != NULL && list_store->stamp == iter->stamp)
....







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