PDA

View Full Version : custom attribute of view


johnagrandy
08-02-2003, 06:46 PM
if i declare a custom attribute within a view, then why is it not possible within the tag of a child of that view to refer to the attribute value via parent.myAttribute ?

antun
08-04-2003, 01:02 AM
I'm not sure what's not working for you. Do you mean something like this:


<canvas>
<view name="redView" width="50" height="50" bgcolor="red">
<attribute name="myAttribute" value="25" />
<view name="myChild" height="10" bgcolor="blue"
width="$once{parent.myAttribute}" />
</view>
</canvas>


Some of the newer attribute syntax is described here:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=263

-Antun