[Laszlo-checkins] r12008 - openlaszlo/trunk/docs/src/developers/programs
lou@openlaszlo.org
lou at openlaszlo.org
Mon Dec 8 09:41:10 PST 2008
Author: lou
Date: 2008-12-08 09:39:34 -0800 (Mon, 08 Dec 2008)
New Revision: 12008
Modified:
openlaszlo/trunk/docs/src/developers/programs/clickregion.lzx
openlaszlo/trunk/docs/src/developers/programs/color-$7.lzx
openlaszlo/trunk/docs/src/developers/programs/input-devices-$10.lzx
openlaszlo/trunk/docs/src/developers/programs/input-devices-$4.lzx
openlaszlo/trunk/docs/src/developers/programs/input-devices-$7.lzx
openlaszlo/trunk/docs/src/developers/programs/input-devices-$9.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$1.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$10.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$11.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$12.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$2.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$3.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$7.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$8.lzx
openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$9.lzx
openlaszlo/trunk/docs/src/developers/programs/states-$5.lzx
openlaszlo/trunk/docs/src/developers/programs/views-$11.lzx
openlaszlo/trunk/docs/src/developers/programs/views-$15.lzx
openlaszlo/trunk/docs/src/developers/programs/views-$3.lzx
Log:
Change 20081208-lou-O by lou at loumac.local on 2008-12-08 12:46:52 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: dguide, chapters 15 - 31: emphasize Debug.debug over Debug.write in examples
Bugs Fixed:
Technical Reviewer: tucker
QA Reviewer: (pending)
Doc Reviewer: (pending)
Details:
Change some examples that used the debugger to use text instead.
The majority of changed examples fell into this category.
Change remaining examples using Debug.write() to use Debug.debug.
Tests: visual verify
Modified: openlaszlo/trunk/docs/src/developers/programs/clickregion.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/clickregion.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/clickregion.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,8 +1,9 @@
-<canvas width="100%" height="500" debug="true">
+<canvas width="100%" height="300">
<view height="150" width="100" bgcolor="red"
clickable="true" resource="resources/lzwaitcursor_rsc.swf"
stretches="both" clickregion="resources/lzwaitcursor_rsc.swf"
- onclick="Debug.write('click')" />
+ onclick="message.addText('\nclick')" />
+ <text id="message" y="140" multiline="true" />
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
Modified: openlaszlo/trunk/docs/src/developers/programs/color-$7.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/color-$7.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/color-$7.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,16 +1,11 @@
-
-<canvas height="300" width="100%" debug="true">
- <simplelayout axis="x"/>
+<canvas height="110" width="100%">
+ <simplelayout axis="x" spacing="4"/>
<class name="fader">
<view height="100" width="100">
- <handler name="onclick">
- immediateparent.animate('opacity', -.20, 25, true);
- </handler>
- <handler name="onmouseout" >
- immediateparent.animate('opacity', 1, 2500, false);
- </handler>
+ <handler name="onclick"> immediateparent.animate('opacity', -.20, 25, true); </handler>
+ <handler name="onmouseout"> immediateparent.animate('opacity', 1, 2500, false); </handler>
</view>
-
+
</class>
<fader name="houston" bgcolor="0xFF0000">
<text text="Comet"/>
@@ -21,12 +16,12 @@
<fader name="seattle" bgcolor="0x008000">
<text text="Storm"/>
</fader>
- <script>
- Debug.write("Click on a view to reduce its opacity.");
- Debug.write("Mouse out to restore 100% opacity.");
- </script>
+ <text multiline="true">
+ Click on a view to reduce its opacity.<br/>
+ Mouse out to restore 100% opacity.
+ </text>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
-* Use is subject to license terms. *
-* X_LZ_COPYRIGHT_END ****************************************************** -->
+ * Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
+ * Use is subject to license terms. *
+ * X_LZ_COPYRIGHT_END ****************************************************** -->
\ No newline at end of file
Modified: openlaszlo/trunk/docs/src/developers/programs/input-devices-$10.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/input-devices-$10.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/input-devices-$10.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,16 +1,13 @@
-
<canvas width="100%" height="200" debug="true">
<debug x="110" y="15" />
-
+
<!-- NOTE: Even though the view below takes focus oninit,
- in some browsers you might still need to click on the
- application itself, to take the focus away from the
- browser itself and to the Flash Player. -->
-
+ in some browsers you might still need to click on the
+ application itself, to take the focus away from the
+ browser itself and to the Flash Player. -->
<view width="100" height="100" bgcolor="0x333399"
- focusable="true"
- oninit="lz.Focus.setFocus(this)">
-
+ focusable="true"
+ oninit="lz.Focus.setFocus(this)">
<handler name="oninit">
this.keyCodes = new Array()
this.keyCodes[65] = "A for Apple";
@@ -18,15 +15,14 @@
this.keyCodes[79] = "O for Optometrist";
this.keyCodes[83] = "S for Sammy";
this.keyCodes[90] = "Z for Zebra";
- </handler>
-
+ </handler>
<handler name="onkeydown" args="akeycode">
// respond here
- Debug.write( "Key pressed: " + akeycode );
+ Debug.debug("%w", ("Key pressed: " + akeycode));
if ( this.keyCodes[akeycode] != undefined ) {
- Debug.write( this.keyCodes[akeycode] );
+ Debug.debug("%s", this.keyCodes[akeycode] );
} else {
- Debug.write( "you pressed: " + String.fromCharCode(akeycode) );
+ Debug.debug("%w", ("you pressed: " + String.fromCharCode(akeycode)));
}
</handler>
</view>
Modified: openlaszlo/trunk/docs/src/developers/programs/input-devices-$4.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/input-devices-$4.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/input-devices-$4.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,5 +1,4 @@
-
-<canvas width="100%">
+<canvas width="100%" height="110">
<view width="100" height="100" bgcolor="green">
<handler name="onclick">
lz.Cursor.showHandCursor(true);
Modified: openlaszlo/trunk/docs/src/developers/programs/input-devices-$7.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/input-devices-$7.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/input-devices-$7.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,20 +1,19 @@
-
<canvas height="500" width="100%" debug="true">
- <debug y="300"/>
- <view width="300" height="300" bgcolor="red" clickable="true" >
- <attribute name="moustracker_del" value="$once{ new LzDelegate( this, 'trackmouse' )}" />
- <handler name="onmousedown" >
- moustracker_del.register(lz.Idle,'onidle');
- </handler>
-
- <handler name="onmouseup" >
- moustracker_del.unregisterAll();
- </handler>
-
- <method name="trackmouse" args="v">
- Debug.write("mousex,mousey =", this.getMouse('x'),this.getMouse('y'));
- </method>
- </view>
+ <debug y="300"/>
+ <view width="300" height="300" bgcolor="red" clickable="true" >
+ <attribute name="moustracker_del" value="$once{ new LzDelegate( this, 'trackmouse' )}" />
+ <handler name="onmousedown" >
+ moustracker_del.register(lz.Idle,'onidle');
+ </handler>
+
+ <handler name="onmouseup" >
+ moustracker_del.unregisterAll();
+ </handler>
+
+ <method name="trackmouse" args="v">
+ Debug.debug("%s %d %d", "mousex, mousey:", this.getMouse('x'),this.getMouse('y'));
+ </method>
+ </view>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
Modified: openlaszlo/trunk/docs/src/developers/programs/input-devices-$9.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/input-devices-$9.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/input-devices-$9.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,21 +1,17 @@
-<canvas debug="true" width="100%">
-
-<view width="350" height="100" bgcolor="#cccccc">
-
-<text text="Right click in the gray area (but not on this text)"/>
-
-<handler name="oninit">
- var cmenu = new lz.contextmenu(); // create the menu
- var item1 = cmenu.makeMenuItem('hello', new LzDelegate(this, "handlerightclick")); // create the menu item, and set up an LzDelegate as a callback
- cmenu.addItem(item1); //add the item to the menu
- this.setContextMenu(cmenu);
-</handler>
-
- <method name="handlerightclick" args="val">
- Debug.write("hello world");
- </method>
-</view>
-
+<canvas height="200" width="100%">
+ <view width="350" height="100" bgcolor="#cccccc">
+ <text text="Right click in the gray area (but not on this text)"/>
+ <handler name="oninit">
+ var cmenu = new lz.contextmenu(); // create the menu
+ var item1 = cmenu.makeMenuItem('hello', new LzDelegate(this, "handlerightclick")); // create the menu item, and set up an LzDelegate as a callback
+ cmenu.addItem(item1); //add the item to the menu
+ this.setAttribute("contextmenu", cmenu);
+ </handler>
+ <method name="handlerightclick" args="val">
+ message.addText("\nhello world");
+ </method>
+ </view>
+ <text id="message" y="100" multiline="true" />
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
Modified: openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$1.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$1.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$1.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,13 +1,11 @@
-
-<canvas debug="true" width="100%">
- <debug />
- <node id="myNode">
+<canvas height="30" width="100%">
+ <text id="message">
<method name="myMethod">
- Debug.write('It is a nice day if it does not rain.');
+ this.setAttribute('text', 'Nice day if it doesn\'t rain.');
</method>
- </node>
+ </text>
<script>
- myNode.myMethod()
+ message.myMethod()
</script>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
Modified: openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$10.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$10.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$10.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,27 +1,24 @@
-
-<canvas debug="true" width="100%">
+<canvas height="200" width="100%">
<class name="base" extends="button">
<handler name="onclick" method="handleonclick" />
<method name="handleonclick" args="v">
- Debug.write("base click");
+ message.addText("\nbase click");
</method>
- </class>
-
+ </class>
<base text="Accumulate">
<handler name="onclick">
- Debug.write("subaccumulate click");
+ message.addText("\nsubaccumulate click");
</handler>
- </base>
-
+ </base>
<base text="Override">
<method name="handleonclick" args="v">
- Debug.write("suboverride click");
+ message.addText("\nsuboverride click");
</method>
</base>
-
+ <text id="message" multiline="true" />
<simplelayout />
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
-* Use is subject to license terms. *
-* X_LZ_COPYRIGHT_END ****************************************************** -->
+ * 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-$11.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$11.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$11.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,28 +1,25 @@
-
-<canvas debug="true" width="100%">
+<canvas height="200" width="100%">
<class name="base" extends="button">
- <handler name="onclick" method="handleonclick" />
+ <handler name="onclick" method="handleonclick"/>
<method name="handleonclick" args="v">
Debug.write("base click");
</method>
</class>
-
+ <simplelayout/>
<base id="yours" text="Yours">
<handler name="onclick">
- Debug.write("Your click");
+ message.addText("\nYour click");
</handler>
- </base>
-
+ </base>
<base text="Mine">
<method name="handleonclick" args="v">
- Debug.write("My click");
+ message.addText("\nMy click");
</method>
<handler name="onclick" reference="yours">
- Debug.write("Someone is pushing your buttons.");
+ message.addText("\nSomeone is pushing your buttons.");
</handler>
- </base>
-
- <simplelayout />
+ </base>
+ <text id="message" y="40" multiline="true" />
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
Modified: openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$12.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$12.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$12.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,34 +1,27 @@
-
<canvas debug="true" width="100%">
- <debug />
-
+ <debug />
+
<class name="myclass_with_handler">
<event name="myevent"/>
<handler name="myevent" args="myargs">
- Debug.write(this, 'handling myevent, myargs=', myargs);
+ Debug.debug("%w", (this + 'handling myevent, myargs=' + myargs));
</handler>
-
+
<attribute name="season" type="string" value="spring" />
<event name="onseason" />
<handler name="onseason" args="s">
- Debug.write("got season of ", s, ", season is ", season);
+ Debug.debug("%w", ("got season of " + s + ", season is " + season));
</handler>
- </class>
-
- <myclass_with_handler id="foo" />
-
-
- <button onclick="foo.myevent.sendEvent(12)" text="send the event" />
- <button onclick="foo.setAttribute('season', 'fall')" text="autumn" />
-
- <!-- Don't do this! Setting an attribute directly with '=' shortcuts around
- the event system. This is not right; use setAttribute instead -->
- <button onclick="foo.season='winter'" text="evil" />
-
- <simplelayout axis="x" spacing="5" />
-
+ </class>
+ <myclass_with_handler id="foo" />
+ <simplelayout axis="x" spacing="5" />
+ <button onclick="foo.myevent.sendEvent(12)" text="send the event" />
+ <button onclick="foo.setAttribute('season', 'fall')" text="autumn" />
+ <!-- Don't do this! Setting an attribute directly with '=' shortcuts around
+ the event system. This is not right; use setAttribute instead -->
+ <button onclick="foo.season='winter'" text="evil" />
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2007, 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-$2.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$2.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$2.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,15 +1,13 @@
-
-<canvas debug="true" width="100%">
- <debug y="10"/>
- <node id="myNode">
+<canvas height="50" width="100%">
+ <text id="message">
<method name="add" args="a,b">
var sum = a + b;
- Debug.write('a + b = ' + sum);
+ this.setAttribute('text', ('a + b = ' + sum));
</method>
- </node>
+ </text>
<script>
- myNode.add(4,9)
- </script>
+ message.add(4,9)
+ </script>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
Modified: openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$3.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$3.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$3.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,18 +1,16 @@
-
-<canvas debug="true" width="100%">
- <debug y="10"/>
- <node id="myNode">
+<canvas height="50" width="100%">
+ <text id="message" multiline="true">
<method name="returnsum" args="a,b">
var sum = 3 + 4;
- Debug.write('a + b = ' + sum);
+ this.setAttribute('text', ('a + b = ' + sum));
return sum;
</method>
- </node>
+ </text>
<script>
- var x = 5;
- var y = myNode.returnsum();
- var z = x + y;
- Debug.write('z equals ' + z)
+ var x = 5;
+ var y = message.returnsum();
+ var z = x + y;
+ message.addText('\nz equals ' + z)
</script>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
Modified: openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$7.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$7.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$7.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,17 +1,16 @@
-
-<canvas debug="true" width="100%">
- <debug y=" 20"/>
- <button>
- Howdy!
- <handler name="onclick">
- Debug.write("handler one")
- </handler>
- <handler name="onclick">
- Debug.write("handler two")
- </handler>
- <handler name="onclick">
- Debug.write("handler three")
- </handler>
+<canvas height="100" width="100%">
+ <text y="20" id="message" multiline="true" />
+ <button>
+ Howdy!
+ <handler name="onclick">
+ message.addText("\nhandler one")
+ </handler>
+ <handler name="onclick">
+ message.addText("\nhandler two")
+ </handler>
+ <handler name="onclick">
+ message.addText("\nhandler three")
+ </handler>
</button>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
Modified: openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$8.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$8.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$8.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,14 +1,12 @@
-
-<canvas debug="true" width="100%">
- <debug y="50"/>
- <simplelayout/>
- <view name="myview" height="30" width="30" bgcolor="blue"/>
- <button>
- Make red the blue box!
- <handler name="onclick" method="redify"/>
- <method name="redify" args="v">
- parent.myview.setAttribute("bgcolor", red)
- </method>
+<canvas height="50" width="100%">
+ <simplelayout/>
+ <view name="myview" height="30" width="30" bgcolor="blue"/>
+ <button>
+ Make red the blue box!
+ <handler name="onclick" method="redify"/>
+ <method name="redify" args="v">
+ parent.myview.setAttribute("bgcolor", "red")
+ </method>
</button>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
Modified: openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$9.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$9.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/methods-events-attributes-$9.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,26 +1,25 @@
-
-<canvas debug="true" width="100%">
+<canvas height="200" width="100%">
<class name="base" extends="button">
<handler name="onclick" method="handleonclick" />
<method name="handleonclick" args="v">
- Debug.write("base click");
+ message.addText("\nbase click");
</method>
</class>
-
+
<class name="subaccumulate" extends="base">
<handler name="onclick">
- Debug.write("subaccumulate click");
+ message.addText("\nsubaccumulate click");
</handler>
</class>
-
+
<class name="suboverride" extends="base">
<method name="handleonclick" args="v">
- Debug.write("suboverride click");
+ message.addText("\nsuboverride click");
</method>
</class>
-
<subaccumulate>accumulate</subaccumulate>
<suboverride>override</suboverride>
+ <text id="message" multiline="true" />
<simplelayout />
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
Modified: openlaszlo/trunk/docs/src/developers/programs/states-$5.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/states-$5.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/states-$5.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,9 +1,9 @@
-<canvas debug="true" width="100%">
+<canvas height="200" width="100%">
<class name="testState" extends="state">
<attribute name="countApplies" type="number" value="0"
- setter="this.countApplies = countApplies"/>
+ setter="this.countApplies = countApplies"/>
<handler name="onapplied">
- <![CDATA[
+ <![CDATA[
if(this.applied == true){
this.setAttribute('countApplies', this['countApplies'] >= 0 ? ++this.countApplies : 1);
}
@@ -13,11 +13,12 @@
<button >Try it
<handler name="onclick">
ts.setAttribute('applied', true);
- Debug.write("applies:" + ts.countApplies);
+ message.addText("\napplies:" + ts.countApplies);
ts.setAttribute('applied', false);
</handler>
<testState name="ts"/>
</button>
+ <text id="message" y="30" multiline="true" />
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. *
Modified: openlaszlo/trunk/docs/src/developers/programs/views-$11.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/views-$11.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/views-$11.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,13 +1,12 @@
-
-<canvas width="100%" height="350" debug="true">
- <debug y="60" />
+<canvas width="100%" height="100">
<view name="parentView" x="10" bgcolor="blue" height="40" width="40"
- oninit="Debug.write('parentView x is', x)" >
- <view name="childView" x="35" bgcolor="yellow" height="20" width="20"
- oninit="Debug.write('childview x is', x)"/>
- </view>
+ oninit="pview.setAttribute('text', ('parentview x is ' + x))"/>
+ <view name="childView" x="35" bgcolor="yellow" height="20" width="20"
+ oninit="cview.setAttribute('text', ('childview x is ' + x))"/>
+ <text x="10" y="50" id="pview"/>
+ <text x="10" y="70" id="cview"/>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
Modified: openlaszlo/trunk/docs/src/developers/programs/views-$15.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/views-$15.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/views-$15.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,10 +1,8 @@
-
-<canvas width="100%" height="300" debug="true">
- <debug y="120"/>
- <font src="helmetb.ttf" name="helmet"/>
+<canvas width="100%" height="300">
+ <font src="helmetb.ttf" name="helmet"/>
<view stretches="both" height="100" bgcolor="red"
- onclick="this.animate('height', -10, 1000 , true );
- Debug.write('greenview new width is', greenview.width)">
+ onclick="this.animate('height', -10, 1000 , true );
+ message.addText('\ngreenview new width is ' + greenview.width)">
<attribute name="aspect" value="${unstretchedwidth/unstretchedheight}"/>
<attribute name="width" value="${ height * aspect}"/>
<view name="greenview" height="100" width="80" bgcolor="green"/>
@@ -12,6 +10,7 @@
This is some text
</text>
</view>
+ <text id="message" y="100">Click on the green or red box</text>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
Modified: openlaszlo/trunk/docs/src/developers/programs/views-$3.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/views-$3.lzx 2008-12-08 17:38:29 UTC (rev 12007)
+++ openlaszlo/trunk/docs/src/developers/programs/views-$3.lzx 2008-12-08 17:39:34 UTC (rev 12008)
@@ -1,7 +1,6 @@
-
-<canvas width="100%" height="160" debug="true">
- <debug y="30"/>
- <view height="20" width="20" onclick="Debug.write('howdy')"/>
+<canvas width="100%" height="30">
+ <view height="20" width="20" onclick="message.setAttribute('text', 'howdy')"/>
+ <text id="message" />
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
More information about the Laszlo-checkins
mailing list