Author: hqm Date: 2008-03-24 07:42:12 -0700 (Mon, 24 Mar 2008) New Revision: 8364
Modified: openlaszlo/branches/devildog/ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js openlaszlo/branches/devildog/docs/component-browser/common.lzx openlaszlo/branches/devildog/docs/component-browser/components.lzx openlaszlo/branches/devildog/docs/component-browser/hierarchyview.lzx openlaszlo/branches/devildog/docs/src/developers/lzunit.dbk openlaszlo/branches/devildog/docs/src/developers/performance.dbk openlaszlo/branches/devildog/docs/src/developers/programs/css-$13.lzx openlaszlo/branches/devildog/docs/src/developers/programs/input-devices-$9.lzx openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-10.lzx openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-3.lzx openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-4.lzx openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-5.lzx openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-6.lzx openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-9.lzx openlaszlo/branches/devildog/docs/src/developers/tutorials/calculator.dbk openlaszlo/branches/devildog/docs/src/developers/tutorials/programs/calculator-$10.lzx openlaszlo/branches/devildog/docs/src/developers/tutorials/programs/calculator-$11.lzx openlaszlo/branches/devildog/docs/src/developers/video.dbk openlaszlo/branches/devildog/lps/components/rpc/ajax.lzx openlaszlo/branches/devildog/test/smoke/regression.lzl openlaszlo/branches/devildog/test/smoke/smokecheck.lzx Log: Merged revisions 8341-8357 via svnmerge from http://svn.openlaszlo.org/openlaszlo/trunk ....... r8344 | max | 2008-03-21 19:28:24 -0400 (Fri, 21 Mar 2008) | 28 lines Change 20080320-maxcarlson-u by [EMAIL PROTECTED] on 2008-03-20 19:00:50 PDT in /Users/maxcarlson/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Fix bug-2125 regression test New Features: Bugs Fixed: LPP-5610 - bug-2125 regression test is broken Technical Reviewer: ptw QA Reviewer: promanik Doc Reviewer: (pending) Documentation: Release Notes: Details: regression.lzl - Updated bug-2125 to deal with asynchronous loading. smoke.lzx - Uncomment bug-2125 LzSprite.js - Remove unused source attribute, use resource instead so __imgonload sends the right value. Tests: trunk/test/smoke/smokecheck.lzx and trunk/test/smoke/smokecheck.lzx?lzr=dhtml. Also see updated testcase in LPP-5610. ....... r8346 | lou | 2008-03-22 06:54:52 -0400 (Sat, 22 Mar 2008) | 15 lines Change 20080322-lou-T by [EMAIL PROTECTED] on 2008-03-22 06:51:02 AST in /Users/lou/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Add introductory paragraphs and code snippet from 3.4 Bugs Fixed: LPP-5658 (partial) Technical Reviewer: (pending) QA Reviewer: (pending) Doc Reviewer: (pending) Tests: visual verify ....... r8348 | lou | 2008-03-22 10:18:53 -0400 (Sat, 22 Mar 2008) | 19 lines Change 20080322-lou-q by [EMAIL PROTECTED] on 2008-03-22 09:58:02 AST in /Users/lou/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: replace deprecated <method event=> tags with <handler name=> Bugs Fixed: LPP-5662 Technical Reviewer: (pending) QA Reviewer: mamye Doc Reviewer: (pending) Details: In addition to what was in JIRA, fix the text examples in the docbook source. Tests: visual verify for the docs/src stuff ....... Property changes on: openlaszlo/branches/devildog ___________________________________________________________________ Name: svnmerge-integrated - /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497 /openlaszlo/trunk:1-8340 + /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497 /openlaszlo/trunk:1-8357 Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js =================================================================== --- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2008-03-24 14:42:12 UTC (rev 8364) @@ -395,7 +395,6 @@ LzSprite.prototype.frames = null; LzSprite.prototype.blankimage = lzOptions.ServerRoot + '/lps/includes/blank.gif'; LzSprite.prototype.resource = null; -LzSprite.prototype.source = null; LzSprite.prototype.visible = null; LzSprite.prototype.text = null; LzSprite.prototype.clip = null; @@ -463,7 +462,6 @@ if ( r.indexOf('http:') == 0 || r.indexOf('https:') == 0){ this.skiponload = false; this.setSource( r ); - this.resource = r; return; } @@ -522,7 +520,7 @@ //Debug.info('setSource ' + url) this.loading = true; - this.source = url; + this.resource = url; if (! this.__ImgPool) { this.__ImgPool = new LzPool(LzSprite.prototype.__getImage, LzSprite.prototype.__gotImage, LzSprite.prototype.__destroyImage, this); } Modified: openlaszlo/branches/devildog/docs/component-browser/common.lzx =================================================================== --- openlaszlo/branches/devildog/docs/component-browser/common.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/component-browser/common.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -66,14 +66,14 @@ <attribute name="texthilitecolor" value="0x325693" type="number" /> <attribute name="textcolor" value="0x000000" type="number" /> <attribute name="textselectedcolor" value="0xFFFFFF" type="number" /> - <method event="onclick"> + <handler name="onclick"> var file = (this.file != '' ? this.file : 'lz.' + this.text + '.html'); var url = canvas.urlprefix + file; LzBrowser.loadURL('javascript: var wptr = window.open("' + url + '","laszlo_reference","resizable=1,width=1000,height=700,left=0,top=0,screenX=0,screenY=0,menubar,location,status,scrollbars,toolbar,address"); wptr.focus(); void(0);'); - </method> - <method event="onmouseup"> + </handler> + <handler name="onmouseup"> setAttribute('fgcolor', this.texthilitecolor) - </method> + </handler> </class> <class name="border" defaultplacement="content" bgcolor="0x404040"> Modified: openlaszlo/branches/devildog/docs/component-browser/components.lzx =================================================================== --- openlaszlo/branches/devildog/docs/component-browser/components.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/component-browser/components.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -24,10 +24,10 @@ <keyview width="${parent.parent.width - 40 - parent.tv.width - this.boxsize}" /> </view> <button name="other" text="See Related Components"> - <method event="onclick"> + <handler name="onclick"> canvas.treehier.setAttribute('visible', false); canvas.related.setAttribute('visible', true); - </method> + </handler> </button> </view> @@ -107,16 +107,16 @@ </tabs> <button name="back" text="See Components Hierarchy"> - <method event="onclick"> + <handler name="onclick"> canvas.treehier.setAttribute('visible', true); canvas.related.setAttribute('visible', false); - </method> + </handler> </button> </view> </canvas> <!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** -* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. * +* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. * * Use is subject to license terms. * * X_LZ_COPYRIGHT_END ****************************************************** --> Modified: openlaszlo/branches/devildog/docs/component-browser/hierarchyview.lzx =================================================================== --- openlaszlo/branches/devildog/docs/component-browser/hierarchyview.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/component-browser/hierarchyview.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -47,11 +47,11 @@ <!-- Do this to get around resource and frame (constrained) onclick view problem. (b 3466) --> <view name="expander"> - <method event="onclick"> + <handler name="onclick"> if (! classroot.isleaf) { classroot.setAttribute("open", ! classroot.open); } - </method> + </handler> <view name="expander" resource="$once{classroot.expander}" frame="${classroot.isleaf ? 3 @@ -61,14 +61,14 @@ onmouseover="setAttribute('fgcolor', classroot.style.texthilitecolor)" onmouseout="setAttribute('fgcolor', classroot.style.textcolor)" onmousedown="setAttribute('fgcolor', classroot.style.textselectedcolor)"> - <method event="onclick"> + <handler name="onclick"> var file = (classroot.file != '' ? classroot.file : classroot.text + '.html'); var url = canvas.urlprefix + file; LzBrowser.loadURL('javascript: var wptr = window.open("' + url + '","test","resizable=1,width=1000,height=700,left=0,top=0,screenX=0,screenY=0,menubar,location,status,scrollbars,toolbar,address"); wptr.focus(); void(0);'); - </method> - <method event="onmouseup"> + </handler> + <handler name="onmouseup"> setAttribute('fgcolor', classroot.style.texthilitecolor) - </method> + </handler> </text> </view> @@ -89,9 +89,9 @@ <linktree text="combobox" isleaf="true" file="lz.combobox.html" /> <linktree text="datepickercombobox" isleaf="true"> <!-- there's no doc for datepickerday --> - <method event="oninit"> + <handler name="oninit"> this.treeitem.text.setAttribute('clickable', false); - </method> + </handler> </linktree> </linktree> <linktree text="basedatacombobox" key="base" file="lz.basedatacombobox.html"> @@ -128,9 +128,9 @@ isleaf="true" /> <linktree text="datepickerlistitem" isleaf="true"> <!-- there's no doc for datepickerday --> - <method event="oninit"> + <handler name="oninit"> this.treeitem.text.setAttribute('clickable', false); - </method> + </handler> </linktree> </linktree> </linktree> @@ -178,17 +178,17 @@ <linktree text="basedatepickerday" key="base" file="lz.basedatepickerday.html"> <linktree text="datepickerday" isleaf="true"> <!-- there's no doc for datepickerday --> - <method event="oninit"> + <handler name="oninit"> this.treeitem.text.setAttribute('clickable', false); - </method> + </handler> </linktree> </linktree> <linktree text="basedatepickerweek" key="base" file="lz.basedatepickerweek.html"> <linktree text="datepickerweek" isleaf="true"> <!-- there's no doc for datepickerweek --> - <method event="oninit"> + <handler name="oninit"> this.treeitem.text.setAttribute('clickable', false); - </method> + </handler> </linktree> </linktree> </linktree> <!-- view --> @@ -199,6 +199,6 @@ </library> <!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** -* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. * +* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. * * Use is subject to license terms. * * X_LZ_COPYRIGHT_END ****************************************************** --> Modified: openlaszlo/branches/devildog/docs/src/developers/lzunit.dbk =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/lzunit.dbk 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/lzunit.dbk 2008-03-24 14:42:12 UTC (rev 8364) @@ -252,7 +252,7 @@ <para>A while statement attached to (goButton.go==true) would loop infinitely, or until a buttonclick set the "go" attribute to false, but how to test for infinity? Maybe it's something the developer has to take on faith, but JavaScript does have its limit: <literal>Number.MAX_VALUE</literal> is the largest number JavaScript can represent. The while statement is <literal>while (goButton.counter < Number.MAX_VALUE)</literal>.</para> -<para>I am not sure if it is good style to declare "counter" as a button attribute, but I think that must be better than initializing the counter variable on the canvas (with the script <literal><method event="oninit">var goButton.counter=1;</method></literal>). Before adding the code for the while loop and the code for the button attribute, there's a test to write: Does the goButton have a attribute "displayed" that equals 1?</para> +<para>I am not sure if it is good style to declare "counter" as a button attribute, but I think that must be better than initializing the counter variable on the canvas (with the script <literal><handler name="oninit">var goButton.counter=1;</handler></literal>). Before adding the code for the while loop and the code for the button attribute, there's a test to write: Does the goButton have a attribute "displayed" that equals 1?</para> <example role="live-example"> <title>testGoButtonCounter</title> Modified: openlaszlo/branches/devildog/docs/src/developers/performance.dbk =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/performance.dbk 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/performance.dbk 2008-03-24 14:42:12 UTC (rev 8364) @@ -560,9 +560,9 @@ </method> <!-- Update positioning whenever thingy's width changes --> -<method event="onwidth" target="thingy"> +<handler name="onwidth" target="thingy"> this.update(); -</method> +</handler> .... </view> </programlisting></example> @@ -578,7 +578,7 @@ </view> </programlisting> <para> -The second form is much more compact and readable, but the first form uses zero constraints. The call <literal><method event="onwidth" target="thingy"></literal> is nearly a constraint on <literal>thingy.width</literal>, but: in the explicit-update form, one <literal>thingy.onwidth</literal> event can trigger a single call to update which, which will end up doing the repositioning that otherwise would require at least a handful of constraints. Like constraints, method calls are expensive. So, fewer constraints, fewer method calls, faster performance.</para> +The second form is much more compact and readable, but the first form uses zero constraints. The call <literal><handler name="onwidth" target="thingy"></literal> is nearly a constraint on <literal>thingy.width</literal>, but: in the explicit-update form, one <literal>thingy.onwidth</literal> event can trigger a single call to update which, which will end up doing the repositioning that otherwise would require at least a handful of constraints. Like constraints, method calls are expensive. So, fewer constraints, fewer method calls, faster performance.</para> <para/></section><section><title>Tuning attribute assignments</title> <para> You may, in some limited circumstances, gain a performance boost by assigning attribute values instead of setting them using a setter, (preferably, the <indexterm><primary><literal>setAttribute()</literal></primary></indexterm><methodname>setAttribute()</methodname> method). In general, using <literal>object.setAttribute('attr', value); </literal> to set an attribute is the best way to set attributes, as explained in <xref linkend="methods-events-attributes"/>. </para> Modified: openlaszlo/branches/devildog/docs/src/developers/programs/css-$13.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/programs/css-$13.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/programs/css-$13.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -33,26 +33,26 @@ </class> <button text="Dynamically create Mookie"> -<method event="onclick"> +<handler name="onclick"> canvas.mookieView=new mookie(canvas, {}); -</method> +</handler> </button> <button text="Dynamically create Blaylock" y="50"> -<method event="onclick"> +<handler name="onclick"> canvas.blaylockWindow=new blaylock(canvas, {}); -</method> +</handler> </button> <button text="Dynamically create Wilson" y="100"> -<method event="onclick"> +<handler name="onclick"> canvas.wilsonText=new wilson(canvas, {}); -</method> +</handler> </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/branches/devildog/docs/src/developers/programs/input-devices-$9.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/programs/input-devices-$9.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/programs/input-devices-$9.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -4,12 +4,12 @@ <text text="For my context menu to work, I need to run in SWF8"/> -<method event="oninit"> +<handler name="oninit"> var cmenu = new LzContextMenu(); // 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); -</method> +</handler> <method name="handlerightclick" args="val"> Debug.write("hello world"); @@ -18,6 +18,6 @@ </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/branches/devildog/docs/src/developers/programs/testdriven-10.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-10.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-10.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -8,7 +8,7 @@ <attribute name="go" type="boolean" value="true"/> <attribute name="counter" type="number" value="1" when="once"/> -<method event="onclick"> +<handler name="onclick"> if (goButton.go==true) { if (goButton.counter<Number.MAX_VALUE) { foo = new LzDelegate(this, "count", LzIdle, "onidle"); @@ -22,7 +22,7 @@ this.setAttribute('text', 'Go'); this.setAttribute('go', true); } -</method> +</handler> <method name="count"> Debug.write(counter); @@ -41,4 +41,7 @@ </TestSuite> </canvas> -<!-- Copyright 2001-2007 Laszlo Systems, Inc. --> \ No newline at end of file +<!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** +* Copyright 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/branches/devildog/docs/src/developers/programs/testdriven-3.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-3.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-3.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -7,7 +7,7 @@ <attribute name="go" type="boolean" value="true"/> -<method event="onclick"> +<handler name="onclick"> if (goButton.go==true) { this.setAttribute('text', 'Stop'); this.setAttribute('go', false); @@ -18,7 +18,7 @@ this.setAttribute('go', true); Debug.write(this.getAttribute('go'), "should be 'true'"); } -</method> +</handler> </button> @@ -31,4 +31,7 @@ </TestSuite> </canvas> -<!-- Copyright 2001-2007 Laszlo Systems, Inc. --> \ No newline at end of file +<!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** +* Copyright 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/branches/devildog/docs/src/developers/programs/testdriven-4.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-4.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-4.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -7,7 +7,7 @@ <attribute name="go" type="boolean" value="true"/> -<method event="onclick"> +<handler name="onclick"> if (goButton.go==true) { this.setAttribute('text', 'Stop'); this.setAttribute('go', false); @@ -16,7 +16,7 @@ this.setAttribute('text', 'Go'); this.setAttribute('go', true); } -</method> +</handler> </button> @@ -30,4 +30,7 @@ </TestSuite> </canvas> -<!-- Copyright 2001-2007 Laszlo Systems, Inc. --> \ No newline at end of file +<!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** +* Copyright 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/branches/devildog/docs/src/developers/programs/testdriven-5.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-5.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-5.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -8,7 +8,7 @@ <attribute name="go" type="boolean" value="true"/> <attribute name="counter" type="number" value="1" when="once"/> -<method event="onclick"> +<handler name="onclick"> if (goButton.go==true) { this.setAttribute('text', 'Stop'); this.setAttribute('go', false); @@ -17,7 +17,7 @@ this.setAttribute('text', 'Go'); this.setAttribute('go', true); } -</method> +</handler> </button> @@ -31,4 +31,7 @@ </TestSuite> </canvas> -<!-- Copyright 2001-2007 Laszlo Systems, Inc. --> \ No newline at end of file +<!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** +* Copyright 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/branches/devildog/docs/src/developers/programs/testdriven-6.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-6.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-6.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -8,7 +8,7 @@ <attribute name="go" type="boolean" value="true"/> <attribute name="counter" type="number" value="1" when="once"/> -<method event="onclick"> +<handler name="onclick"> if (goButton.go==true) { this.setAttribute('text', 'Stop'); this.setAttribute('go', false); @@ -21,7 +21,7 @@ this.setAttribute('text', 'Go'); this.setAttribute('go', true); } -</method> +</handler> </button> @@ -35,4 +35,7 @@ </TestSuite> </canvas> -<!-- Copyright 2001-2007 Laszlo Systems, Inc. --> +<!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** +* Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. * +* Use is subject to license terms. * +* X_LZ_COPYRIGHT_END ****************************************************** --> Modified: openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-9.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-9.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/programs/testdriven-9.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -8,7 +8,7 @@ <attribute name="go" type="boolean" value="true"/> <attribute name="counter" type="number" value="1" when="once"/> -<method event="onclick"> +<handler name="onclick"> if (goButton.go==true) { if (goButton.counter<Number.MAX_VALUE) { foo = new LzDelegate(this, "count", LzIdle, "onidle"); @@ -21,7 +21,7 @@ this.setAttribute('text', 'Go'); this.setAttribute('go', true); } -</method> +</handler> <method name="count"> Debug.write(counter); @@ -40,4 +40,7 @@ </TestSuite> </canvas> -<!-- Copyright 2001-2007 Laszlo Systems, Inc. --> \ No newline at end of file +<!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** +* Copyright 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/branches/devildog/docs/src/developers/tutorials/calculator.dbk =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/tutorials/calculator.dbk 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/tutorials/calculator.dbk 2008-03-24 14:42:12 UTC (rev 8364) @@ -360,9 +360,9 @@ <text name="buttonText" font="obliqueText" fontsize="25" fgcolor="#ffffff" x="13" valign="middle"> - <method event="ontext"> + <handler name="ontext"> this.setAttribute('width', this.getTextWidth() + 5); - </method> + </handler> </text> </class> <emphasis role="em"></library></emphasis> Modified: openlaszlo/branches/devildog/docs/src/developers/tutorials/programs/calculator-$10.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/tutorials/programs/calculator-$10.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/tutorials/programs/calculator-$10.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -27,9 +27,9 @@ <text name="buttonText" font="obliqueText" fontsize="25" fgcolor="#ffffff" x="13" valign="middle" width="0"> - <method event="ontext"> + <handler name="ontext"> this.setAttribute('width', this.getTextWidth() + 5); - </method> + </handler> </text> </class> @@ -245,6 +245,6 @@ </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/branches/devildog/docs/src/developers/tutorials/programs/calculator-$11.lzx =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/tutorials/programs/calculator-$11.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/tutorials/programs/calculator-$11.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -41,9 +41,9 @@ <text name="buttonText" font="obliqueText" fontsize="25" fgcolor="#ffffff" x="13" valign="middle" width="0"> - <method event="ontext"> + <handler name="ontext"> this.setAttribute('width', this.getTextWidth() + 5); - </method> + </handler> </text> </class> @@ -251,6 +251,6 @@ </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/branches/devildog/docs/src/developers/video.dbk =================================================================== --- openlaszlo/branches/devildog/docs/src/developers/video.dbk 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/docs/src/developers/video.dbk 2008-03-24 14:42:12 UTC (rev 8364) @@ -437,7 +437,7 @@ name="text" value="${(s1.broadcasting == false) ? 'broadcast' : 'stop broadcasting'}" /> - <method event="onclick"><![CDATA[ + <handler name="onclick"><![CDATA[ if (cam.show == false) { live.stream.setAttribute('url', parent.username.text); live.stream.broadcast(); @@ -447,7 +447,7 @@ cam.setAttribute('show', false); } ]]> - </method> + </handler> </button> <checkbox onvalue="s1.setAttribute('muteaudio', value)">Mute Audio</checkbox> Modified: openlaszlo/branches/devildog/lps/components/rpc/ajax.lzx =================================================================== --- openlaszlo/branches/devildog/lps/components/rpc/ajax.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/lps/components/rpc/ajax.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -1,49 +1,7 @@ <library> - <!--- Implements XMLHttpRequest - http://developer.apple.com/internet/webcontent/xmlhttpreq.html - http://www.whatwg.org/specs/web-apps/current-work/#scripted-http - - Incompatibilites with spec: - - Proxied: - - SOLO: - - + Cannot set HTTP headers (except maybe content-type?) - + Cannot access response headers - + Cannot send raw POST data(?) - - but we could eventually send verbatim XML POST data payload - using XML.sendAndLoad(). - Q: Does XML.sendAndLoad() handle a single text content node - with no tags around it? - - + Cannot send repeated query args in a POST using LoadVars - - + Username/password HTTP Auth args to send() not supported. - Can user/password be sent in URL? We cannot set our own auth headers in SOLO mode... - - Questions: - In the spec, when you use XMLHTTPRequest.send(string), what is it supposed to - do when the content is a string? - Is it supposed to send the text verbatim as the POST content body? - --> - <class name="XMLHttpRequest" extends="node"> - <!--- readyState Object status integer: - 0 Uninitialised - The initial value. - 1 Open - The open() method has been successfully called. - 2 Sent - The send() method has been successfully called, but no data has yet been received. - 3 Receiving - Data is being received, but the data transfer is not yet complete. - 4 Loaded - The data transfer has been completed. - - --> <attribute name="readyState" value="0" type="number"/> <!-- Event handler for an event that fires at every state change @@ -228,8 +186,59 @@ this.dataset.setHeader(key,val); </method> - - + <doc> + <tag name="shortdesc"><text>An implementation of XMLHttpRequest (also called "AJAX")</text></tag> + <text> + <p>This class implements the XMLHTTPRequest as <a href="http://developer.apple.com/internet/webcontent/xmlhttpreq.html" shape="rect"> + specified</a> by the <a href="http://www.whatwg.org/specs/web-apps/current-work/#scripted-http" shape="rect">WHATWG</a> consortium.</p> + <p>In SOLO deployed applications, this class departs from the specification in these ways:</p> + <ul> + + <li>Cannot set HTTP headers</li> + + <li>Cannot access response headers</li> + + <li>Cannot send raw POST data</li> + + <li>Cannot send repeated query args in a POST using LoadVars</li> + + <li>Username/password Auth args to send() not supported</li> + + </ul> + <programlisting> + <script> + function loadXMLDoc(url) { + var req = new XMLHttpRequest(); + req.onreadystatechange = processReqChange; + req.open("GET", url, true); + req.setRequestHeader('X-Test', 'one'); + req.setRequestHeader('X-Test', 'two'); + req.send(null); + } + + function processReqChange(request) { + Debug.write("processReqChange: req.readyState", request.readyState); + // only if request shows "loaded" + if (request.readyState == 4) { + // only if "OK" + if (request.status == 200) { + Debug.write("arg =", request); + Debug.write("request.status", request.status); + Debug.write("request.responseText:", request.responseText); + Debug.write("request.responseXML:", request.responseXML); + Debug.write("request.getAllResponseaders:", + request.getAllResponseHeaders()); + } else { + Debug.write("There was a problem retrieving the XML data:\n" + + request.statusText); + } + } + } + </script> + </programlisting> + </text> + </doc> + </class> </library> Modified: openlaszlo/branches/devildog/test/smoke/regression.lzl =================================================================== --- openlaszlo/branches/devildog/test/smoke/regression.lzl 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/test/smoke/regression.lzl 2008-03-24 14:42:12 UTC (rev 8364) @@ -824,10 +824,15 @@ </class> <class name="bug_2125" extends="TestCase"> - <view name="lview"/> + <view name="lview"> + <handler name="onload"> + parent.assertNotNull(this['resource'], 'resource attribute undefined!'); + parent.assertEquals(this['resource'], 'http:../resources/gif/logo.gif'); + </handler> + </view> + <method name="testSrc"> - lview.setSource('http:../resources/swf/logo.swf') - assertNotUndefined(lview['resource'], 'Source attribute undefined!') + lview.setSource('http:../resources/gif/logo.gif') </method> </class> Modified: openlaszlo/branches/devildog/test/smoke/smokecheck.lzx =================================================================== --- openlaszlo/branches/devildog/test/smoke/smokecheck.lzx 2008-03-24 14:06:19 UTC (rev 8363) +++ openlaszlo/branches/devildog/test/smoke/smokecheck.lzx 2008-03-24 14:42:12 UTC (rev 8364) @@ -119,7 +119,7 @@ <bug_1899/> <bug_2029/> <bug_2113/> -<!-- Broken: LPP-5160 <bug_2125/> --> + <bug_2125/> <bug_2131/> <bug_2223/> <bug_2225/> _______________________________________________ Laszlo-checkins mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins
