Annoyance with treestore (SimpleList) and remove row



Hi when I remove a row in a simplelist I get the following warning

 Gtk-CRITICAL **: gtk_list_store_get_value: assertion `VALID_ITER
(iter, list_store)' failed at /usr/lib/perl5/Gtk2/SimpleList.pm line
248.
*** unhandled exception in callback:
***   [gperl_sv_from_value] FIXME: unhandled type - 0 ((null)
fundamental for (null))
***  ignoring at /home/mike/dvd_cat.pl line 467.

Code is

                $itemdel->signal_connect('activate'=>sub{
                my @index= $header_table->get_selected_indices;

warning occurs with  both
splice @{$header_table->{data}},$index[0],1;

and
my $iter=&get_iter_from_index($header_table,\ index);

$header_table->get_model->remove($iter);

}
);

sub get_iter_from_index {
my ($wid,$index)= _;
my $path=Gtk2::TreePath->new_from_indices(@{$index});
my $iter=$wid->get_model->get_iter($path);
return $iter;


}

Any ideas on how to remove warning. In both cases the function works fine



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