[Laszlo-checkins] r12711 - openlaszlo/trunk/lps/components/incubator

pbr@openlaszlo.org pbr at openlaszlo.org
Sun Feb 1 18:54:18 PST 2009


Author: pbr
Date: 2009-02-01 18:54:15 -0800 (Sun, 01 Feb 2009)
New Revision: 12711

Modified:
   openlaszlo/trunk/lps/components/incubator/basecheckbox.lzx
   openlaszlo/trunk/lps/components/incubator/baseradio.lzx
Log:
Change 20090201-Philip-0 by Philip at Philip-DC on 2009-02-01 18:23:44 EST
     in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix radio button in incubator

New Features:

Bugs Fixed: LPP-7698

Technical Reviewer: henry
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
The last change to the incubator changed a method name from setValue to doSetValue. The problem is that setValue is an override and the name can't be changed. The way to fix the problem in compiling for
swf9 is to specify a default value for the second argument. I also changed it in baseradio.  baseedittext has a similar issue but
setValue() has 3 arguments. The change appears to be safe (because the old override of setValue did not call the base class).

Tests:
The following test works properly in swf8/swf9, dhtml.

<canvas>
<include href="incubator/lzradio_resources.lzx" /> <include href="incubator/lzradio.lzx" />

<include href="incubator/newcheckbox.lzx" />

<simplelayout spacing="20"/>

<baseradiogroup layout="class:simplelayout" bgcolor="%cccccc">
   <lzradiobutton value="1">Button 1</lzradiobutton>
   <lzradiobutton value="2">Button 2</lzradiobutton>
   <lzradiobutton value="3">Button 3</lzradiobutton> </baseradiogroup>

<newcheckbox bgcolor="%cccccc">Checkbox 1</newcheckbox>

</canvas>


Files:
M      lps/components/incubator/basecheckbox.lzx
M      lps/components/incubator/baseradio.lzx


http://svn.openlaszlo.org/openlaszlo/patches/20090201-Philip-0.tar



Modified: openlaszlo/trunk/lps/components/incubator/basecheckbox.lzx
===================================================================
--- openlaszlo/trunk/lps/components/incubator/basecheckbox.lzx	2009-02-01 23:45:15 UTC (rev 12710)
+++ openlaszlo/trunk/lps/components/incubator/basecheckbox.lzx	2009-02-02 02:54:15 UTC (rev 12711)
@@ -5,17 +5,17 @@
     <class name="basecheckbox" extends="baseformitem">
 
         <!--- True if it's checked, else false. Default is false. -->
-        <attribute name="value" value="false" setter="doSetValue(value, false)" />
+        <attribute name="value" value="false" setter="setValue(value, false)" />
 
         <!--- Toggles the value when the space bar is pressed while focused. -->
         <method name="doSpaceUp">
-            if (this._enabled) this.doSetValue(!this.value, false);
+            if (this._enabled) this.setValue(!this.value, false);
         </method>
 
         <!--- @keywords private -->
         <handler name="onclick" method="doClick" />
         <method name="doClick" args="ignore">
-            if (this._enabled) this.doSetValue(!this.value, false);
+            if (this._enabled) this.setValue(!this.value, false);
         </method>
 
         <!--- @keywords private -->
@@ -28,7 +28,7 @@
               @param Any value: can be any Javascript type and is evaluated as its
               boolean equivalent, strings "true" and "false" are treated specially
               to represent true and false respectively. -->
-        <method name="doSetValue" args="value,isinitvalue">
+        <method name="setValue" args="value,isinitvalue=null">
             if (this['value'] == value) return;
 
             if (value == "false") {

Modified: openlaszlo/trunk/lps/components/incubator/baseradio.lzx
===================================================================
--- openlaszlo/trunk/lps/components/incubator/baseradio.lzx	2009-02-01 23:45:15 UTC (rev 12710)
+++ openlaszlo/trunk/lps/components/incubator/baseradio.lzx	2009-02-02 02:54:15 UTC (rev 12711)
@@ -201,7 +201,7 @@
           that can have many radiobuttons associated with it -->
     <class name="baseradiogroup" extends="baseformitem">
         <!--- The value for the baseradiogroup. -->
-        <attribute name="value" value="null" setter="this.doSetValue(value, false)"/>
+        <attribute name="value" value="null" setter="this.setValue(value, false)"/>
 
         <!--- Array of radiobuttons associated with this baseradiogroup.
               @keywords private -->
@@ -227,7 +227,7 @@
 
             if (this._rbuttons == null) this._rbuttons = [];
             if (rb.selected) {
-                this.doSetValue(rb.value, false);
+                this.setValue(rb.value, false);
             } else {
                 if (rb.value == this.value) {
                     if (!rb.selected) rb.setAttribute('selected', true);
@@ -243,7 +243,7 @@
               @param Any value: the value to set.
               @param Boolean isinitvalue: true if value is rollback value, else
               false. -->
-        <method name="doSetValue" args="value,isinitvalue"> <![CDATA[
+        <method name="setValue" args="value,isinitvalue=null"> <![CDATA[
             if (this['value'] == value) return;
             if (this._rbuttons != null) {
                 for (var i=0; i < this._rbuttons.length; i++) {



More information about the Laszlo-checkins mailing list