(solved) PropertyLink Help

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

zarroba
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Tue Jul 11, 2006 12:54

(solved) PropertyLink Help

Postby zarroba » Tue Nov 20, 2007 11:07

Hi,
I'm making a widget that has a child that is a button. But the image on the button may change according to the state of the widget. So I tried to use PropertyLink to Link a property named NormalImage to the NormalImage property of the button widget. The thing is that NormalImage is a Property and a State in the button widget and therefore crashes the program on start with error:

Code: Select all

An error occurred at line nr. 5993 while parsing XML file 'TaharezLook.looknfeel'.  Additional information: Element 'PropertyDefinition' is not valid for content model: '((PropertyDefinition,PropertyLinkDefinition,Property,NamedArea,Child,ImagerySection),StateImagery)'


The code I'm using to link is:

Code: Select all

<PropertyLinkDefinition name="NormalImage" widget="__expand_button__" targetProperty="NormalImage" initialValue="" />


Is there anything I can do to make this link work without changing the button widget?
Last edited by zarroba on Wed Nov 21, 2007 14:30, edited 1 time in total.

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

Postby CrazyEddie » Wed Nov 21, 2007 11:54

Hi,

It should work, from the error you posted it seems like it's something as simple as the order of definition of the PropertyLink - check that the LookNFeel has things defined in the order specified in the error...

1 - PropertyDefinition Elements
2 - PropertyLink Elements
3 - Property Elements
etc...

In other words make sure your PropertyLink line appears after the PropertyDefinition lines.

HTH

CE.

zarroba
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Tue Jul 11, 2006 12:54

Postby zarroba » Wed Nov 21, 2007 14:29

Thanks that solved the problem..


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests