pydyp
02-14-2008, 06:10 AM
Suppose:
<canvas title="myTest" debug="true">
<dataset name="myDataset">
<META>
<FC041 NAME="RED"/>
<FC041 NAME="BLUE"/>
<FC041 NAME="GREEN"/>
</META>
</dataset>
<class name="myClass1" extends="view" width="500" height="200">
<attribute name="myAttr" type="boolean"/>
<simplelayout axis="y"/>
<view width="100%" height="20" datapath="myDataset:/META/FC041">
<edittext datapath="@NAME" visible="${classroot.myAttr}"/>
</view>
</class>
<class name="myClass2" extends="view" width="500" height="200">
<attribute name="myAttr" type="boolean"/>
<simplelayout axis="y"/>
<replicator dataset="myDataset" xpath="/META/FC041">
<view width="100%" height="20">
<edittext datapath="@NAME" visible="${classroot.myAttr}"/>
</view>
</replicator>
</class>
<myClass1 y="0" myAttr="true"/>
<myClass2 y="200" myAttr="true"/>
</canvas>
for myClass1, it works fine.
for myClass2, I have this message: WARNING @test.lzx#21: reference to undefined property 'myAttr'
I need to use the Class2 (explicite replication).
I dont know what to do.
Could someone help me please.
Thanks
<canvas title="myTest" debug="true">
<dataset name="myDataset">
<META>
<FC041 NAME="RED"/>
<FC041 NAME="BLUE"/>
<FC041 NAME="GREEN"/>
</META>
</dataset>
<class name="myClass1" extends="view" width="500" height="200">
<attribute name="myAttr" type="boolean"/>
<simplelayout axis="y"/>
<view width="100%" height="20" datapath="myDataset:/META/FC041">
<edittext datapath="@NAME" visible="${classroot.myAttr}"/>
</view>
</class>
<class name="myClass2" extends="view" width="500" height="200">
<attribute name="myAttr" type="boolean"/>
<simplelayout axis="y"/>
<replicator dataset="myDataset" xpath="/META/FC041">
<view width="100%" height="20">
<edittext datapath="@NAME" visible="${classroot.myAttr}"/>
</view>
</replicator>
</class>
<myClass1 y="0" myAttr="true"/>
<myClass2 y="200" myAttr="true"/>
</canvas>
for myClass1, it works fine.
for myClass2, I have this message: WARNING @test.lzx#21: reference to undefined property 'myAttr'
I need to use the Class2 (explicite replication).
I dont know what to do.
Could someone help me please.
Thanks