Claudio Saavedra wrote: > El mar, 03-11-2009 a las 16:53 -0500, dhk escribió: >> I have a program that declares a number of GtkTreeIter's. Recently the >> prepending to the parent iter broke. I found out that, in some cases, >> the stamp to the iter's are negative just after the iter is declared. >> This means the iter is invalid. The following test program does the >> same thing. >> >> Why aren't all the stamps to the four iter's (a, b, c, and d) valid and >> positive? > > Because your iters are not initialized at all... you are going the wrong > way on the search for a solution to your initial problem. What do you > mean by "prepending to the parent iter broke"? > > Claudio >
In the gtk-demo program has a block as follows in the Tree View/Tree Store example. This doesn't initialize the the child iter before using it in the gtk_tree_store_append(), but the stamp is valid. /* add children */ while (holiday->label) { GtkTreeIter child_iter; gtk_tree_store_append (model, &child_iter, &iter); gtk_tree_store_set (model, &child_iter, HOLIDAY_NAME_COLUMN, holiday->label, ALEX_COLUMN, holiday->alex, HAVOC_COLUMN, holiday->havoc, TIM_COLUMN, holiday->tim, OWEN_COLUMN, holiday->owen, DAVE_COLUMN, holiday->dave, VISIBLE_COLUMN, TRUE, WORLD_COLUMN, holiday->world_holiday, -1); holiday++; } _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list