Re: modifying Gtk2::TreeIter contents
- From: muppet <scott asofyet org>
- To: Kevin Ryde <user42 zip com au>
- Cc: gtk-perl-list gnome org
- Subject: Re: modifying Gtk2::TreeIter contents
- Date: Sat, 5 Jul 2008 17:09:55 -0400
On Jul 4, 2008, at 8:23 PM, Kevin Ryde wrote:
I'm tinkering with a custom treemodel and thought to implement a
`remove' method behaving the same as the remove method of
Gtk2::ListStore. That would mean modifying the given iter to refer to
the row after the one removed. Is there a secret way to modify the
contents of a boxed-up Gtk2::TreeIter?
Not really. I think the trick is to bump your model's stamp to
invalidate all existing iters and require the caller to acquire new
ones. You can use a Path instead of an Iter to keep track of where
you were (the Path is essentially a list of indices; if you remove 10,
then 10 is now automatically pointing at what used to be the next one).
(I've said it a billion times before, but the iters are a major pain
for bindings.)
--
Me: What's that in your mouth?
Zella: *swallows laboriously* Nothing.
Me: What did you just swallow?
Zella: A booger.
Me: Baby girl, don't eat boogers. That's gross.
Zella: But it was in my nose.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]