Page 1 of 1

property iterator & ambiguous access

Posted: Sat Mar 05, 2005 16:53
by kitt3n
Hi there,

I need to get the Properties of my controls,
so I added sth like this =>

Code: Select all

CEGUI::PropertySet::PropertyIterator pi = mainmenuWnd->getIterator();


But it fails with the following error:

error C2385: ambiguous access of 'getIterator' in 'CEGUI::Window'
could be the 'getIterator' in base 'CEGUI::PropertySet::getIterator'
or the 'getIterator' in base 'CEGUI::EventSet::getIterator'


I made a dirty hack like this:

Code: Select all

CEGUI::PropertySet::PropertyIterator pi =
((CEGUI::PropertySet*)mainmenuWnd)->getIterator();

But I'd like to know if there is a nice & clean way to do this

Thanks in advance!

/Roger

Re: property iterator & ambiguous access

Posted: Sat Mar 05, 2005 18:40
by CrazyEddie
C++ scope resolution works pretty much anywhere, so:

Code: Select all

CEGUI::PropertySet::PropertyIterator pi = mainmenuWnd->CEGUI::PropertySet::getIterator();


Would be the correct way to resolve the ambiguity.

HTH

CE.

Re: property iterator & ambiguous access

Posted: Sat Mar 05, 2005 21:39
by kitt3n
Thanks - learned sth new ;)

/R