Hi Jeremy > > Window* parent = wl->back()->getParent(); // wl is declared as 'const > > WidgetList* wl' > > Was this the only line you needed to change? Were there others? :)>
If it had only been as easy as modifying 1 line, I would have sent you a patch rather than complaining :) I could not get the beast compiling because in so many places the same programming logic is used. If I remove constness from somewhere, it propagates upwards from caller to caller until everything becomes non const ... I still don't understand how it can work with you guys ... Typical things that seem wrong to me are: in src/UIObjectParent:54 object_type* _getByName(const std::string& name) const { for(ConstIterator i = begin(); i != end(); i++) { if(i->valid() && i->get()->getName() == name) return i->get(); } return 0; } A const method doing a const-iteration on a container cannot return a non const pointer to an element of that container, can it ? Somewhere else: void Window::_setFocused(Widget* widget) { [...] } bool Window::setFocused(const Widget* widget) { ConstIterator i = std::find(begin(), end(), widget); _setFocused(i->get()); } // i->get() returns a const Widget* that cannot be passed as argument to _setFocused(), can it ? I'm starting to feel strange, as if I had seen an alien and the FBI in my garden and the government had told me that nothing had happened. Nothing. So would have had my neighbours, making me feel alone and not so sure that I had actually seen anything. :) Regards Thibault _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org