[Laszlo-checkins] r11733 - openlaszlo/trunk/docs/src/developers/programs
jcrowley@openlaszlo.org
jcrowley at openlaszlo.org
Wed Nov 12 10:42:01 PST 2008
Author: jcrowley
Date: 2008-11-12 10:41:58 -0800 (Wed, 12 Nov 2008)
New Revision: 11733
Modified:
openlaszlo/trunk/docs/src/developers/programs/databinding-$14.lzx
openlaszlo/trunk/docs/src/developers/programs/databinding-$16.lzx
Log:
Change 20081111-laszlo-2 by laszlo at T43-L3XEXMW on 2008-11-11 02:26:04 EST
in /home/laszlo/src/svn/openlaszlo/trunk-liquid
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Two databinding dguide fixes.
New Features:
Bugs Fixed: LPP-7218 - Databinding example doesn't run in DHTML
LPP-7217 - Databinding example doesn't run in DHTML
Technical Reviewer: promanik
QA Reviewer: max
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Changed name "top" to "thetop" to avoid the
use of a reserved word.
Tests: Run the two affected files in DHTML. They should
now actually run and operate, instead of halting with
an error.
Modified: openlaszlo/trunk/docs/src/developers/programs/databinding-$14.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/databinding-$14.lzx 2008-11-12 17:04:49 UTC (rev 11732)
+++ openlaszlo/trunk/docs/src/developers/programs/databinding-$14.lzx 2008-11-12 18:41:58 UTC (rev 11733)
@@ -1,6 +1,6 @@
<canvas height="200" >
<dataset name="numbers"/>
- <datapointer name="top" xpath="numbers:/"/>
+ <datapointer name="thetop" xpath="numbers:/"/>
<datapointer name="numptr">
<handler name="ondata" args="d">
@@ -22,10 +22,10 @@
</edittext>
<button name="bSend" text="Add">
<handler name="onclick" method="compute"/>
- <method name="compute">
+ <method name="compute" args="ignore=null">
if(parent.input.getText().length > 0){
- top.addNode(parent.input.getText())
- var end = top.xpathQuery('*/last()')
+ thetop.addNode(parent.input.getText())
+ var end = thetop.xpathQuery('*/last()')
numptr.setXPath('numbers:/*[' + end + ']')
parent.input.clearText()
}
@@ -44,7 +44,7 @@
<text id="result" fgcolor="blue" fontstyle="bold">
<method name="update" args="v">
parent.sum += Number(v)
- this.setText(parent.sum / top.p.childNodes.length)
+ this.setAttribute('text', parent.sum / thetop.p.childNodes.length)
</method>
</text>
</view>
Modified: openlaszlo/trunk/docs/src/developers/programs/databinding-$16.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/databinding-$16.lzx 2008-11-12 17:04:49 UTC (rev 11732)
+++ openlaszlo/trunk/docs/src/developers/programs/databinding-$16.lzx 2008-11-12 18:41:58 UTC (rev 11733)
@@ -2,7 +2,7 @@
<dataset name="stack">
<root/>
</dataset>
- <datapointer name="top" xpath="stack:/root"/>
+ <datapointer name="thetop" xpath="stack:/root"/>
<datapointer xpath="stack:/root/*[1]/name()" rerunxpath="true">
<handler name="ondata" args="d">
@@ -31,19 +31,19 @@
<handler name="onclick" method="handleclick"/>
<method name="handleclick" args="ignore">
var n = parent.input.getText();
- if (top.p.childNodes.length == 0) {
- top.addNode(n)
+ if (thetop.p.childNodes.length == 0) {
+ thetop.addNode(n)
} else {
var ne = new lz.DataElement(n)
- top.p.insertBefore(ne, top.p.getFirstChild())
+ thetop.p.insertBefore(ne, thetop.p.getFirstChild())
}
parent.input.clearText()
</method>
</button>
<button name="bPop" text="Pop">
<handler name="onclick">
- var last = top.xpathQuery('*[1]')
- top.p.removeChild(last)
+ var last = thetop.xpathQuery('*[1]')
+ thetop.p.removeChild(last)
</handler>
</button>
</view>
More information about the Laszlo-checkins
mailing list