[Laszlo-checkins] r3719 - openlaszlo/branches/legals/lps/components/base
max@openlaszlo.org
max at openlaszlo.org
Wed Feb 7 19:16:50 PST 2007
Author: max
Date: 2007-02-07 19:16:48 -0800 (Wed, 07 Feb 2007)
New Revision: 3719
Modified:
openlaszlo/branches/legals/lps/components/base/baseslider.lzx
Log:
Change 20070207-maxcarlson-R by maxcarlson at max-carlsons-computer.local on 2007-02-07 16:04:16 PST
in /Users/maxcarlson/openlaszlo/legals
Summary: Fix baseslider.lzx while passing unit test
New Features:
Bugs Fixed:
Technical Reviewer: jcrowley
QA Reviewer: ptw
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Something in Josh's change causes the unit test to fail:
http://localhost:8080/legals/test/components/base/lzunit-baseslider.lzx
It seems like the example is setting the minvalue/maxvalue based on the value of a textfield, which is of course a string. It seems like the right fix is to coerce the values to numbers in the setter functions instead.
Tests: http://localhost:8080/legals/test/components/base/lzunit-baseslider.lzx
Files:
M lps/components/base/baseslider.lzx
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070207-maxcarlson-R.tar
Modified: openlaszlo/branches/legals/lps/components/base/baseslider.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/base/baseslider.lzx 2007-02-08 02:57:50 UTC (rev 3718)
+++ openlaszlo/branches/legals/lps/components/base/baseslider.lzx 2007-02-08 03:16:48 UTC (rev 3719)
@@ -79,6 +79,7 @@
<!--- Set the minimum value.
@param Number v: the minimum value. -->
<method name="setMinValue" args="v"><![CDATA[
+ v = v * 1;
if (!isinited) {
// bounds check and sendEvent are done in init() override in this case
@@ -106,6 +107,7 @@
<!--- Set the maximum value.
@param Number v: the maximum value. -->
<method name="setMaxValue" args="v"><![CDATA[
+ v = v * 1;
if (!isinited) {
// bounds check and sendEvent are done in init() override in this case
@@ -134,6 +136,7 @@
@param Number v: a number between the minimum and maximum
value for the slider. -->
<method name="setValue" args="v"><![CDATA[
+ v = v * 1;
if (!isinited) {
// bounds check and sendEvent are done in init() override in this case
@@ -158,6 +161,7 @@
@param Number p: a percentage between the min and
the max. -->
<method name="setPercentage" args="p">
+ v = v * 1;
var diff = this.minvalue-this.maxvalue;
setValue( diff*p + this.minvalue );
</method>
More information about the Laszlo-checkins
mailing list