Page 1 of 1

(solved) PropertyLink Help

Posted: Tue Nov 20, 2007 11:07
by zarroba
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?

Posted: Wed Nov 21, 2007 11:54
by CrazyEddie
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.

Posted: Wed Nov 21, 2007 14:29
by zarroba
Thanks that solved the problem..