Re: Deleting one item in the treeview?
- From: Bjarne Steinsbà <bosteins broadpark no>
- To: ArtÅras Ålajus <x11 h2o pieva net>
- Cc: gtk-perl-list gnome org
- Subject: Re: Deleting one item in the treeview?
- Date: Sat, 06 Dec 2003 13:05:50 +0100
ArtÅras Ålajus wrote:
hi,
i try to delete one list in simplelist.
delete @{$UserList->{'data'}}[$_] gives empty line.
splice (@{$UserList->{'data'}}, $_, 1) - sometimes it works perfectly,
sometimes it gives:
SPLICE: operation not fully supported at ./gui.pl line 128
Any suggestions?
Delete the items using the methods from the underlying ListStore,
something like (untested)
$UserList->get_model->remove ($iterator);
The iterator is something you normally get from your callback/selection,
or you could convert a path to an iterator using
$UserList->get_model->get_iter ($path);
Or, of course, you could fix SimpleList to fully support the splice
operation and send in patches for that :-)
The delete/splice operations on $UserList->{data} will work fine if
you're working on the end of the list.
Bjarne
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]