Re: Deleting one item in the treeview?

ArtÅras Ålajus wrote:


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 ./ 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.


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