Re: Going through a TreeStore
- From: muppet <scott asofyet org>
- To: "Gtk-Perl" <gtk-perl-list gnome org>
- Subject: Re: Going through a TreeStore
- Date: Wed, 19 May 2004 08:45:01 -0400
On Wednesday, May 19, 2004, at 01:52 AM, Florian Schaefer wrote:
Therefore: Is there a better way to get all iterators in the same
order as the Store is being displayed from below a certain position?
if $iter points to the position below which you want to look (i.e., the
parent node whose children you want to traverse):
if ($model->iter_hash_child ($parent)) {
$child_iter = $model->iter_children ($parent);
do {
# do whatever
} while $child_iter = $model->iter_next ($child_iter);
}
this could be written to search either recursively or iteratively. the
iters will be a little faster than paths.
i don't think, however, that there's a built-in way to fetch all the
children in one go.
--
Examples really shouldn't include unexploded ordinance.
-- Joe Smith, referring to an example program i wrote.
--
elysse (pregnant): are your hands cold?
me: uh, i suppose so.
elysse: will you put them on me?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]