FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ListStore.append(iter); - Segmentation Fault

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
zane.sims



Joined: 07 Aug 2007
Posts: 40

PostPosted: Sun Dec 20, 2009 8:01 am    Post subject: ListStore.append(iter); - Segmentation Fault Reply with quote

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
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Sun Dec 20, 2009 9:55 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group