Re: Invalid GtkTreeIter
- From: dhk <dhkuhl optonline net>
- To: Claudio Saavedra <csaavedra gnome org>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Invalid GtkTreeIter
- Date: Wed, 04 Nov 2009 06:42:28 -0500
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++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]