PDA

View Full Version : data binding breaks simplelayout


mh637
02-14-2005, 05:36 AM
In the following example, I want to set view width to values contained in the data set.

However, this seems to break the horizontal simplelayout.

Any help appreciated.

Thanks a lot!


<canvas height="250" width="600">
<dataset name="data">
<d attr="10"/>
<d attr="20"/>
</dataset>

<class name="myclass" extends="view">
<view height="20" bgcolor="black" width="$path{'@attr'}"/>
</class>

<simplelayout axis="y" spacing="15"/>
<myclass datapath="data:/d"/> <!-- this works -->
<view bgcolor="red">
<simplelayout axis="x" spacing="15"/>
<myclass datapath="data:/d"/> <!-- here, the layout does not work -->
</view>
</canvas>

mh637
02-18-2005, 12:16 AM
Can anyone confirm this bug? (The two rectangles in the horizontal view should be side by side, instead they are on top of each other.)

Any ideas for workarounds?

Any help very appreciated!