Re: Sorting simplelist?



muppet said:

Art?ras ?lajus said:
Anyone knows how i could sort SimpleList?

indeed -- exactly as you would a normal TreeView.
http://lists.gnome.org/archives/gtk-perl-list/2003-November/msg00202.html

since $sl->{data} is (for all intents and purposes) a perl array you could,
though i'm not suggesting it really, do the following

@{$sl->{data}} = sort { # sort func } @{$sl->{data}};

i do think you're probably better off sticking to the suggestion of muppet as
it would be vastly more efficent.

-rm



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