View previous topic :: View next topic |
Author |
Message |
zane.sims
Joined: 07 Aug 2007 Posts: 40
|
Posted: Sun Dec 20, 2009 8:01 am Post subject: ListStore.append(iter); - Segmentation Fault |
|
|
Hey all,
When I do a:
Code: | ListStore.append(iter); |
I get a Segmentation Fault. I noticed that if I first call:
Code: | ListStore.createIter; |
all later calles to append work fine using the created iter. The API Docs say:
Code: | void append (TreeIter iter);
Appends a new row to list_store. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
Params:
TreeIter iter [b]An unset GtkTreeIter to set to the appended row[/b] |
Does that mean it should work with as I expect? (without creating an iter via another means before it is called)
Thanks! _________________ わたしがプログラマだよ! |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Sun Dec 20, 2009 9:55 am Post subject: |
|
|
If you are only defining the variable before the call to append, you are passing null to it instead of a unset TreeIter.
A unset iter is an iter who's data/stamp are not set. |
|
Back to top |
|
|
|