Hi William,
You'll need two additions:
Add this line to your simplecombobox class declaration:
<attribute name="_cbtext" value="$once{this._text}" />
And change this:
<newcombobox_text width="${ parent.width - 19 }" x="7" />
to this:
<text name="_text" width="${ parent.width - 19 }" x="7" />
Let me know how this works for you!
jim
On Jan 24, 2006, at 2:18 PM, William Krick wrote:
newcombobox no longer has newcombobox_text class internally so
sample code
that I had using the old version no longer works. I am unsure how
to fix
this.
Here's the sample code...
<canvas height="500" debug="true">
<!-- place this file in the my-apps folder because of the relative
paths -->
<include href="incubator/newcombobox.lzx" />
<resource name="lzcombobox_lft_rsc">
<frame
src="../lps/components/lz/resources/combobox/combobox_lft_up.swf"/>
<frame src="../lps/components/lz/resources/combobox/
popup_lft_up.swf"/>
<frame
src="../lps/components/lz/resources/combobox/combobox_lft_dsbl.swf"/>
<frame
src="../lps/components/lz/resources/combobox/popup_lft_dsbl.swf"/>
</resource>
<resource name="lzcombobox_mid_rsc">
<frame
src="../lps/components/lz/resources/combobox/combobox_mid_up.swf"/>
<frame src="../lps/components/lz/resources/combobox/
popup_mid_up.swf"/>
<frame
src="../lps/components/lz/resources/combobox/combobox_mid_dsbl.swf"/>
<frame
src="../lps/components/lz/resources/combobox/popup_mid_dsbl.swf"/>
</resource>
<resource name="lzcombobox_rgt_rsc">
<frame src="../lps/components/lz/resources/combobox/
popbtn_rt_up.swf"/>
<frame src="../lps/components/lz/resources/combobox/
popbtn_rt_mo.swf"/>
<frame src="../lps/components/lz/resources/combobox/
popbtn_rt_dn.swf"/>
<frame
src="../lps/components/lz/resources/combobox/popbtn_rt_dsbl.swf"/>
</resource>
<class name="simplecombobox" extends="newcombobox" width="100">
<view width="100%" height="20" focusable="false"
bgcolor="#CCCCCC">
<view name="lft" resource="lzcombobox_lft_rsc"/>
<view name="mid" resource="lzcombobox_mid_rsc"
stretches="width"/>
<basebutton name="rgt" resource="lzcombobox_rgt_rsc"
styleable="true">
<method event="onclick">
LzFocus.setFocus(this,false);
classroot.toggle();
</method>
</basebutton>
<stableborderlayout axis="x"/>
</view>
<newcombobox_text width="${ parent.width - 19 }" x="7" />
</class>
<dataset name="symbol_year" request="true"
ondata="cbyear.selectItemAt(0)"
src="http://www.eio-online.com/symbols/getyear"/>
<dataset name="symbol_make" request="true"
ondata="cbmake.selectItemAt(0)"
src="http://www.eio-online.com/symbols/getmake"/>
<dataset name="symbol_model" request="true"
ondata="cbmodel.selectItemAt(0)"
src="http://www.eio-online.com/symbols/getmodel"/>
<dataset name="symbol_body" request="true"
ondata="cbbody.selectItemAt(0)"
src="http://www.eio-online.com/symbols/getbody"/>
<dataset name="symbol_vin" request="true"
ondata="cbvin.selectItemAt(0)"
src="http://www.eio-online.com/symbols/getvin"/>
<view x="25" y="25" layout="axis:y">
<text>Drill Down</text>
<simplecombobox id="cbyear" width="200"
itemdatapath="symbol_year:/resultset/result"
textdatapath="@modelyear"
valuedatapath="@id" >
<method event="onselect" name="update">
symbol_make.setQueryParam('yearid', cbyear.getValue());
symbol_make.doRequest();
</method>
</simplecombobox>
<simplecombobox id="cbmake" width="200"
itemdatapath="symbol_make:/resultset/result"
textdatapath="@make"
valuedatapath="@id" >
<method event="onselect" name="update">
symbol_model.setQueryParam('yearid', cbyear.getValue());
symbol_model.setQueryParam('makeid', cbmake.getValue());
symbol_model.doRequest();
</method>
</simplecombobox>
<simplecombobox id="cbmodel" width="200"
itemdatapath="symbol_model:/resultset/result"
textdatapath="@model"
valuedatapath="@id" >
<method event="onselect" name="update">
symbol_body.setQueryParam('yearid', cbyear.getValue());
symbol_body.setQueryParam('makeid', cbmake.getValue());
symbol_body.setQueryParam('modelid', cbmodel.getValue());
symbol_body.doRequest();
</method>
</simplecombobox>
<simplecombobox id="cbbody" width="200"
itemdatapath="symbol_body:/resultset/result"
textdatapath="@body"
valuedatapath="@id" >
<method event="onselect" name="update">
symbol_vin.setQueryParam('yearid', cbyear.getValue());
symbol_vin.setQueryParam('makeid', cbmake.getValue());
symbol_vin.setQueryParam('modelid', cbmodel.getValue());
symbol_vin.setQueryParam('bodyid', cbbody.getValue());
symbol_vin.doRequest();
</method>
</simplecombobox>
<simplecombobox id="cbvin" width="200"
itemdatapath="symbol_vin:/resultset/result"
textdatapath="@vin"
valuedatapath="@symbol" >
<method event="onselect" name="update">
symbol.setAttribute('text', cbvin.getValue());
</method>
</simplecombobox>
<text id="symbol" bgcolor="silver" width="200"/>
</view>
</canvas>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user