On Tue, Aug 05, 2003 at 09:42:56AM -0700, Yang Zheng wrote: > "(SimGuiClient.py:20194): Gtk-CRITICAL **: file gtktreeselection.c: line > 491 (gtk_tree_selection_selected_foreach): assertion `has_next' failed. > There is a disparity between the internal view of the GtkTreeView, > and the GtkTreeModel. This generally means that the model has changed > without letting the view know. Any display from now on is likely to > be incorrect." > > #Here is the function attached to the delete button: > > def RemoveWatchVariables(button): > # delete each variable > def DeleteVar(model,path,iter,data=None): > model.remove(iter) > # get selection and iterate through > selection = watchvars_view.get_selection() > selection.selected_foreach(DeleteVar)
The way I see it, selection probably doesn't expect you to delete items from it in a foreach loop (maybe I'm wrong, but since nobody else has answered on that point..). It's probably safer to get the model and iter from selection and work using that. If someone knows, I'll update the FAQ with the rationale. Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/