RE: GtkListStore



 I am confused by this statement :
"Additionally, some models guarantee that an iterator is 
valid for as long as
the node it refers to is valid (most notably the GtkTreeStore and
GtkListStore)" (GtkTreeModel doc).


  Does it mean that I can store/save the interator in my 
application and use it
later to access the data ? ( Even if I delete/add rows ? )

I wouldn't recommend it.  What happens if you store it and the thing it
points to gets deleted? or moved? I *THINK* that at that point the iterator
becomes invalid, but even if it doesnt and you use it, you will not be
pointing at what you expect to be pointing at.

I agree with you though, the documentation is not very clear when it
introduces phrases like "... some models ...".  To me this sounds like they
mean, "...depending on how the model is implemented..." - I could be wrong.

Regards,
Martyn



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