Hello,
in PropertyDefinition::set(), the name of the property is added to the window with setUserString(d_userStringName,...).
Now when you add a PropertyDefinition to a PropertySet, the set() function doesn't get called, so you have to call it manually. The property exists, but it isn't in the right map.
There is an exception at this point:
String PropertyDefinition::get(const PropertyReceiver* receiver) const
{
return static_cast<const Window*>(receiver)->getUserString(d_userStringName); <----------- setUserString() was never called !!!
}
I don't know if you consider this a bug, but it is pretty hard to find this problem if you encounter it.
PropertyDefinition bug?
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: PropertyDefinition bug?
Hi,
I looked at the code, and it's definitely a bug as far as I can tell. The issue has never come up previously, so must be getting 'covered' by some other operation.
Thanks for catching this one - it must have been in there lurking since 2005 I've added a ticket for the issue and it should get fixed some time soon.
CE.
I looked at the code, and it's definitely a bug as far as I can tell. The issue has never come up previously, so must be getting 'covered' by some other operation.
Thanks for catching this one - it must have been in there lurking since 2005 I've added a ticket for the issue and it should get fixed some time soon.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: PropertyDefinition bug?
This issue is fixed in branches/v0-7 r2431.
The implementation of the fix uses try/catch to save a double look up of the user string name, and is therefore more optimal for the usual case (where the user string already exists). A side-effect of this implementation does mean that the error is still logged, though this is a consequence of the way CEGUI::Exception is currently written (might look to address that in the future).
CE.
The implementation of the fix uses try/catch to save a double look up of the user string name, and is therefore more optimal for the usual case (where the user string already exists). A side-effect of this implementation does mean that the error is still logged, though this is a consequence of the way CEGUI::Exception is currently written (might look to address that in the future).
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 5 guests