[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtkmm
Subject:    Re: [gtkmm] getting the widget "behind" an iterator
From:       Christopher Hennes <chennes () sukrahelitek ! com>
Date:       2001-08-31 14:28:38
[Download RAW message or body]

You need to use (*p)->get_active(); For iterators, the * operator is overloaded
to return a pointer to what you're iterating over.

On Thu, 30 Aug 2001, Jason M'Sadoques wrote:
> Here's a short function:
> 
> void color_dialog::scrolledwindow::color_select(Gtk::Widget *widg)
> {
> Gtk::Box_Helpers::BoxList bxlst(box.children());
> Gtk::Box_Helpers::BoxList::iterator p;
> for(p=bxlst.begin(); p!=bxlst.end(); ++p)
> {
> if(p!=widg && p->get_active())
> p->set_active(0);
> }
> }
> 
> It doesn't compile because of my use of 'p' inside the loop. I am trying to iterate \
> over a list of widgets in box and do something with each. How do I access the \
> widget stored in p? I looked at the tutorial, but it doesn't seem to discuss \
> iterators specifically. At least not in Chapter 9. 
> Thanks.
> 
> P.S. Thanks for the answer to the previous question.
> 
> --
> MACINTOSH = Machine Always Crashes If Not The Operating System Hangs
> "Life would be so much easier if we could just look at the source code." - Dave \
> Olson 
> 
> _______________________________________________
> to unsubscribe or change your subscription parameters :
> http://lists.sourceforge.net/lists/listinfo/gtkmm-main

_______________________________________________
to unsubscribe or change your subscription parameters :
http://lists.sourceforge.net/lists/listinfo/gtkmm-main


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic