Remove Multiple Rows from Gtk2::ListStore
- From: Zettai Muri <zettaimuri ymail com>
- To: gtk-perl-list gnome org
- Subject: Remove Multiple Rows from Gtk2::ListStore
- Date: Wed, 16 Dec 2009 11:24:36 -0800 (PST)
I am having some trouble removing multiple rows. I have a button called Remove that when clicked I want to be
able to remove any selected rows.
At first I tried this:
my ($model,$path,$iter) = @_;
But this gives the following warning:
Gtk-WARNING **: The model has been modified from within gtk_tree_selection_selected_foreach.
This function is for observing the selections of the tree only. If you are trying to get all selected items
from the tree, try using
So then I tried:
my @paths = $selection->get_selected_rows;
foreach my $p (@paths)
my $iter = $model->get_iter($p);
But when I select multiple rows and try to remove them it gives this error:
*** unhandled exception in callback:
*** variable not allowed to be undef where GtkTreeIter is wanted at line 654.
Line 654: $model->remove($iter);
Could someone show me the best way to remove multiple rows?
See what's on at the movies in your area. Find out now: http://au.movies.yahoo.com/session-times/
] [Thread Prev