mmenti
07-15-2006, 04:38 AM
I've been struggling with tabsliders inside tabpanes, and have managed to cut down the issue a little (sample lzx code below).
Here's the issue: the second tabslider doesn't seem to be defined in script, so running the below says:
"reference to undefined variable 'ts_comm'"
If I swap the order of the tabpanes in the lzx, then the error changes to
"reference to undefined variable 'ts_attr'"
In other words, the tabslider in the first tabpane is defined, but the one in the second tabpane isn't..
Is this is a bug, or am I doing something stupid?
Thanks,
Mario.
sample lzx:
<canvas debug="true" width="1024" height="500">
<view width="500" name="myview">
<tabs name="mytabs" width="${parent.width}" height="480">
<tabpane id="tab_att" name="tab_att" text="Attributes">
<tabslider id="ts_attr" name="ts_attr" width="${parent.width-18}" height="${parent.height-18}">
<tabelement name="a" />
</tabslider>
</tabpane>
<tabpane id="tab_comm" name="tab_comm" text="Comments">
<tabslider id="ts_comm" name="ts_comm" width="${parent.width-18}" height="${parent.height-18}">
<tabelement name="a" />
</tabslider>
</tabpane>
<handler name="oninit">
Debug.write(ts_comm);
Debug.write(ts_attr);
</handler>
</tabs>
</view>
</canvas>
Here's the issue: the second tabslider doesn't seem to be defined in script, so running the below says:
"reference to undefined variable 'ts_comm'"
If I swap the order of the tabpanes in the lzx, then the error changes to
"reference to undefined variable 'ts_attr'"
In other words, the tabslider in the first tabpane is defined, but the one in the second tabpane isn't..
Is this is a bug, or am I doing something stupid?
Thanks,
Mario.
sample lzx:
<canvas debug="true" width="1024" height="500">
<view width="500" name="myview">
<tabs name="mytabs" width="${parent.width}" height="480">
<tabpane id="tab_att" name="tab_att" text="Attributes">
<tabslider id="ts_attr" name="ts_attr" width="${parent.width-18}" height="${parent.height-18}">
<tabelement name="a" />
</tabslider>
</tabpane>
<tabpane id="tab_comm" name="tab_comm" text="Comments">
<tabslider id="ts_comm" name="ts_comm" width="${parent.width-18}" height="${parent.height-18}">
<tabelement name="a" />
</tabslider>
</tabpane>
<handler name="oninit">
Debug.write(ts_comm);
Debug.write(ts_attr);
</handler>
</tabs>
</view>
</canvas>