[Laszlo-checkins] r10883 - openlaszlo/trunk/docs/src/developers/programs
jcrowley@openlaszlo.org
jcrowley at openlaszlo.org
Thu Sep 4 22:42:37 PDT 2008
Author: jcrowley
Date: 2008-09-04 22:42:03 -0700 (Thu, 04 Sep 2008)
New Revision: 10883
Modified:
openlaszlo/trunk/docs/src/developers/programs/databinding-$27.lzx
openlaszlo/trunk/docs/src/developers/programs/lzunit-$1.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$23.lzx
openlaszlo/trunk/docs/src/developers/programs/states-$2.lzx
openlaszlo/trunk/docs/src/developers/programs/states-$5.lzx
openlaszlo/trunk/docs/src/developers/programs/states-$6.lzx
openlaszlo/trunk/docs/src/developers/programs/tag_constraints.lzx
Log:
Change 20080813-laszlo-2 by laszlo at T43-L3XEXMW on 2008-08-13 13:19:53 EDT
in /home/laszlo/src/svn/openlaszlo/trunk-solidus
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: An assortment of bug fixes for doc examples
New Features:
Bugs Fixed: LPP-6778 - "Constraints in tags" example in Constraints fails with ActionScript error, SWF9
LPP-6783 - Methods, Events, Attributes example 23 is broken
LPP-6785 - States example 2 fails with ActionScript error, SWF9 exclusive
LPP-6786 - Compilation error in States example 5
LPP-6787 - Compilation Error in Unit Testing example 1, SWF9 exclusive
Technical Reviewer: max
QA Reviewer: henry
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Updated examples to be compliant with current/new ways
of doing things.
Tests: Run each of the modified files and they should compile and
have no ActionScript errors.
Modified: openlaszlo/trunk/docs/src/developers/programs/databinding-$27.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/databinding-$27.lzx 2008-09-05 02:56:33 UTC (rev 10882)
+++ openlaszlo/trunk/docs/src/developers/programs/databinding-$27.lzx 2008-09-05 05:42:03 UTC (rev 10883)
@@ -15,7 +15,7 @@
</dataset>
<simplelayout spacing="10"/>
- <text width="200" oninit="checkSubviews()">
+ <text width="200">
<handler
name="onaddsubview" reference="replicationParent">
this.setAttribute("text", 'number of subviews: ' +
@@ -38,6 +38,6 @@
</button>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
Modified: openlaszlo/trunk/docs/src/developers/programs/lzunit-$1.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/lzunit-$1.lzx 2008-09-05 02:56:33 UTC (rev 10882)
+++ openlaszlo/trunk/docs/src/developers/programs/lzunit-$1.lzx 2008-09-05 05:42:03 UTC (rev 10883)
@@ -12,11 +12,8 @@
assertEquals(prop1, 'foo')
</method>
<method name="testfailure">
- assertTrue(mytext.multiline, "This is not a multiline text field")
+ assertFalse(mytext.multiline, "This is not a multiline text field")
</method>
- <method name="testerror">
- callFoo()
- </method>
<method name="addTests">
this.addTest("testsuccess");
this.addTest("testfailure");
@@ -26,6 +23,6 @@
</TestSuite>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
Modified: openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$23.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$23.lzx 2008-09-05 02:56:33 UTC (rev 10882)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$23.lzx 2008-09-05 05:42:03 UTC (rev 10883)
@@ -2,7 +2,7 @@
<canvas height="300">
<simplelayout spacing="5"/>
<class name="box" height="100" width="100" bgcolor="red">
- <attribute name="label" value="Label"/>
+ <attribute name="label" type="string" value="Label"/>
<text text="${parent.label}" />
</class>
Modified: openlaszlo/trunk/docs/src/developers/programs/states-$2.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/states-$2.lzx 2008-09-05 02:56:33 UTC (rev 10882)
+++ openlaszlo/trunk/docs/src/developers/programs/states-$2.lzx 2008-09-05 05:42:03 UTC (rev 10883)
@@ -4,13 +4,20 @@
onmousedown="this.setAttribute('mouseIsDown', true )"
onmouseup=" this.setAttribute('mouseIsDown', false )">
<attribute name="mouseIsDown" value="false"/>
- <state apply="${parent.mouseIsDown}">
+ <handler name="onmouseIsDown">
+ if(mouseIsDown == true){
+ ds.setAttribute('applied', true);
+ } else {
+ ds.setAttribute('applied', false);
+ }
+ </handler>
+ <state name="ds">
<attribute name="x" value="${parent.getMouse('x') - 10}"/>
<attribute name="y" value="${parent.getMouse('y') - 10}"/>
</state>
</view>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
Modified: openlaszlo/trunk/docs/src/developers/programs/states-$5.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/states-$5.lzx 2008-09-05 02:56:33 UTC (rev 10882)
+++ openlaszlo/trunk/docs/src/developers/programs/states-$5.lzx 2008-09-05 05:42:03 UTC (rev 10883)
@@ -1,23 +1,23 @@
-
<canvas debug="true">
<class name="testState" extends="state">
- <attribute name="countApplies" value="0"
+ <attribute name="countApplies" type="number" value="0"
setter="this.countApplies = countApplies"/>
- <method name="apply">
- this.setAttribute('countApplies', ++this.countApplies);
- super.apply();
- </method>
+ <handler name="onapplied">
+ <![CDATA[
+ this.setAttribute('countApplies', this['countApplies'] >= 0 ? ++this.countApplies : 1);
+ ]]>
+ </handler>
</class>
<button >Try it
<handler name="onclick">
- ts.apply();
+ ts.setAttribute('applied', true);
Debug.write("applies:" + ts.countApplies);
- ts.remove();
+ ts.setAttribute('applied', false);
</handler>
<testState name="ts"/>
</button>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
Modified: openlaszlo/trunk/docs/src/developers/programs/states-$6.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/states-$6.lzx 2008-09-05 02:56:33 UTC (rev 10882)
+++ openlaszlo/trunk/docs/src/developers/programs/states-$6.lzx 2008-09-05 05:42:03 UTC (rev 10883)
@@ -1,7 +1,7 @@
<canvas>
- <window title="state demo" width="400" height="300">
- <state name="max" apply="true">
+ <window title="state demo" width="400" height="300" oninit="this.max.setAttribute('applied', true)">
+ <state name="max">
<animatorgroup duration="1000" process="simultaneous">
<animator attribute="width" to="400"/>
<animator attribute="height" to="300"/>
@@ -10,7 +10,7 @@
</animatorgroup>
<text align="center" y="20%">M a x i m i z e d</text>
</state>
- <state name="min" >
+ <state name="min">
<animatorgroup duration="1000" process="simultaneous">
<animator attribute="width" to="170"/>
<animator attribute="height" to="100"/>
@@ -22,14 +22,14 @@
<button placement="title_area" align="right" height="16"> Toggle
<attribute name="isMax" value="true"/>
<handler name="onclick">
- if (this.isMax) {parent.max.remove(); parent.min.apply();}
- else {parent.max.apply(); parent.min.remove();}
+ if (this.isMax) {parent.max.setAttribute('applied', false); parent.min.setAttribute('applied', true);}
+ else {parent.max.setAttribute('applied', true); parent.min.setAttribute('applied', false);}
this.isMax = !this.isMax;
</handler>
</button>
</window>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
Modified: openlaszlo/trunk/docs/src/developers/programs/tag_constraints.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/tag_constraints.lzx 2008-09-05 02:56:33 UTC (rev 10882)
+++ openlaszlo/trunk/docs/src/developers/programs/tag_constraints.lzx 2008-09-05 05:42:03 UTC (rev 10883)
@@ -2,9 +2,9 @@
<canvas height="160">
<simplelayout spacing="5" />
<slider id = "m" value="25" minvalue="0" maxvalue="100" />
- <text text = "$immediately{'immediately: ' + m.value}" />
- <text text = "$once{'once: ' + m.value}" />
- <text text = "$always{'always: ' + m.value}" />
+ <text text = "$immediately{'immediately: ' + (m?m.value:'undefined')}" />
+ <text text = "$once{'once: ' + (m?m.value:'undefined')}" />
+ <text text = "$always{'always: ' + (m?m.value:'undefined')}" />
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
More information about the Laszlo-checkins
mailing list