[gtkmm] Gtkmm iterators
- From: Roger Leigh <roger whinlatter uklinux net>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Gtkmm iterators
- Date: Thu, 18 Dec 2003 10:54:05 +0000
I'm using a Gtk::MenuShell::MenuList::iterator to look through the
items in an OptionMenu and then erase items I no longer want:
Gtk::MenuShell::iterator cur = items().begin();
while (cur != items().end())
{
[checks here]
if ([check was valid])
{
items().erase(cur);
}
}
}
Question: is the iterator invalidated by the erase()?
Do the same iterator semantics apply to all other lists based on
GLib::HelperList<>?
Many thanks,
Roger
--
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]