Cayman
03-12-2007, 03:03 PM
My program below defines a class "mywidget" that wraps a combobox. Its textlistitems are filled from a dataset which I pass into the mywidget as an argument in its constructor.
When I run this code, the combobox contains the three items, but I get a bunch of warnings and errors in the console:
WARNING: lz/textlistitem.lzx:34: reference to undefined property '_title'
WARNING: lz/textlistitem.lzx:34: undefined object does not have a property 'setAttribute'
and similar errors with the height property. Could anyone please enlighten me what I am doing wrong? I found a similar thread where there was also no response [1].
<canvas debug="true">
<class name="mywidget" >
<attribute name="param" type="string" />
<attribute name="ds" />
<combobox name="combo" editable="false">
<textlistitem
datapath="${'local:parent.parent.ds:/' + parent.parent.param + '/item/'}"
text="$path{'@label'}"
value="$path{'@value'}" />
</combobox>
</class>
<view height="200" width="200">
<dataset name="data">
<items current="Nothing">
<item value="A" label="a" />
<item value="B" label="b" />
<item value="C" label="c" />
</items>
</dataset>
<mywidget param="items" ds="${parent.data}" />
</view>
</canvas>
[1] http://www.openlaszlo.org/pipermail/laszlo-user/2007-January/004895.html
When I run this code, the combobox contains the three items, but I get a bunch of warnings and errors in the console:
WARNING: lz/textlistitem.lzx:34: reference to undefined property '_title'
WARNING: lz/textlistitem.lzx:34: undefined object does not have a property 'setAttribute'
and similar errors with the height property. Could anyone please enlighten me what I am doing wrong? I found a similar thread where there was also no response [1].
<canvas debug="true">
<class name="mywidget" >
<attribute name="param" type="string" />
<attribute name="ds" />
<combobox name="combo" editable="false">
<textlistitem
datapath="${'local:parent.parent.ds:/' + parent.parent.param + '/item/'}"
text="$path{'@label'}"
value="$path{'@value'}" />
</combobox>
</class>
<view height="200" width="200">
<dataset name="data">
<items current="Nothing">
<item value="A" label="a" />
<item value="B" label="b" />
<item value="C" label="c" />
</items>
</dataset>
<mywidget param="items" ds="${parent.data}" />
</view>
</canvas>
[1] http://www.openlaszlo.org/pipermail/laszlo-user/2007-January/004895.html