Re: [gtkmm] Erasing TreeModel rows...



On Thu, 2004-02-26 at 02:30, Matthew Walton wrote:

> Looping through a TreeModel and deleting things as you do above is very 
> liable to lead you to segfaults or unusual behaviour, as once you've 
> deleted the row indicated by iter, iter is no longer valid so you cannot 
> perform iter++ on it to move to the next row. This is a familiar 
> situation from using STL containers as well.

Is the break statement after the erase not enough to avoid attempting to
access the iterator? That was what I was attempting to accomplish with
this break.

> Therefore I would 
> suggest that you have to do this in two stages.

I'll give it a shot, thanks.

Cheers,
~djc




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