PDA

View Full Version : Why does this generate a warning?


cameron
04-06-2005, 05:39 PM
Why does the following generate a warning although it Seems To Work™:

<canvas width="400" height="200">
<view width="400" name="center">
<text align="$once{parent.name}">centered</text>
<text align="center">also centered</text>
<simplelayout axis="y"/>
</view>
</canvas>

The warning is: bad value for attribute "align"

Yes, I realize that align is a "final" attribute -- that's OK, I only need to set it once. Am I doing a bad thing? How should I be doing this?

Cameron

cameron
04-06-2005, 07:35 PM
Looks like the following works without a warning:

<canvas width="400" height="200">
<view width="400" name="center">
<text>
<attribute name="align" value="$once{parent.name}"/>
centered
</text>
<text align="center">also centered</text>
<simplelayout axis="y"/>
</view>
</canvas>
Huh.

Cameron