Re: Going through a TreeStore
- From: Quentin Sculo <squentin free fr>
- To: Gtk-Perl <gtk-perl-list gnome org>
- Subject: Re: Going through a TreeStore
- Date: Wed, 19 May 2004 18:29:52 +0200
I promise this time it works :)
This is a TESTED version from my program:
my $next=$store->get_iter_first;
while (my $iter=$next)
{ if ( $next=$store->iter_children($iter) )
{ # non-leaf, do something
}
else #leaf
{ $next=$store->iter_next($iter);
#do something
}
# $next is undef if there is no child or next brother
# then go up until you find a parent which has a next brother
until ($next)
{ last unless $iter=$store->iter_parent($iter);
$next=$store->iter_next($iter);
}
}
--
Quentin Sculo <squentin free fr>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]