property iterator & ambiguous access

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
kitt3n
Just popping in
Just popping in
Posts: 17
Joined: Wed Jan 12, 2005 12:06

property iterator & ambiguous access

Postby kitt3n » Sat Mar 05, 2005 16:53

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: property iterator & ambiguous access

Postby CrazyEddie » Sat Mar 05, 2005 18:40

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.

User avatar
kitt3n
Just popping in
Just popping in
Posts: 17
Joined: Wed Jan 12, 2005 12:06

Re: property iterator & ambiguous access

Postby kitt3n » Sat Mar 05, 2005 21:39

Thanks - learned sth new ;)

/R


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 11 guests