On 2008-11-17, at 09:58EST, André Bargull wrote:

Not approved.

Changes for LzUtils.lzs, LzNode.lzs, PresentationTypes.lzs are approved. Changes for radio.lzx, basecombobox.lzx, baselist.lzx, baseslider.lzx, baseformitem.lzx are approved, too.

simpletext.lzx - this is not a component, so the changes break data- binding for this class ("simpleinputtext" was already deprecated in 3.1.1, so why not remove?)

Oops. Reverted

edittext.lzx - does not compile because of invalid override + "this.field.acceptValue(..)" is invalid because "this.field" is a LzInputtext

Ok, I kludged around that by putting back applyData and adding acceptValue (which calls applyData). I know this is not right, but it is probably the best I can do with the current component set.

labeledinputtext.lzx - this is not a component, so no "getValue/ acceptValue/etc"

Also reverted.

basevaluecomponent.lzx - bad dependencies-function "$lzc $getValue_dependencies"

I don't see the error here.  Please explain?

(I updated the change)

On 11/17/2008 1:30 AM, P T Withington wrote:
[REVISED to use the naming scheme suggested by André and expanded to ensure all components that participate in apply/updateData protocol use the accept/presentValue path that will correctly convert values from/to string representations according to the type.]

Change 20081115-ptw-x by [EMAIL PROTECTED] on 2008-11-15 18:26:45 EST
   in /Users/ptw/OpenLaszlo/trunk
   for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Respond to review comments on r11780 and r11781

Bugs Fixed:
LPP-7339  Can't use LzNode#presentAttribute in a constraint (previous
fix broke DHTML color conversion)
LPP-7340  basevaluecomponent should have a 'type' so you know how to
accept/present it (previous fix broke updateData protocol)

Technical Reviewer: [EMAIL PROTECTED] (pending)
QA Reviewer: [EMAIL PROTECTED] (pending)

Details:
   LzUtils, PresentationTypes: move (incorrect) conversion of color
   value to string name from LzColorUtils.inttohex to
   ColorPresentationType.present

   LzNode: rename accept/presentValue to accept/presentTypeValue

   radio, simpletext, edittext, labeledinputtext, basecombobox,
   baseformitem: replace applyData/updateData override with
   acceptValue/getValue.  The base applyData/updateData methods use
   the latter.  Ensure that getValue overrides have correct
   dependencies.

   basecomponent:  Define base methods for accept/presentValue that
   operate on the text attribute of a basecomponent.  Make the base
   apply/updateData methods use accept/presentValue (which is how
   subclasses will normally specialize their behavior).

   baselist: Remove useless override

   baseslider: Use presentValue, not updateData to get the thumb
   label.  Make the default keystep one step of the slider's range,
   instead of 2 pixels of thumb movement (which made no sense
   whatsoever).

   basevaluecomponent: Add new API's accept/presentValue which can be
   used to set/retrieve the value as a string according to type.  Fix
   getValue dependencies.  Remove incorrect applyData/updateData and
   updateData dependencies method.  presentValue uses getValue to
   retrieve the value to be presented.  Correct presentValue
   dependencies method.

Tests:
   Andre's test case from LPP-7340, Lou's color example (revised to
   use 'presentValue' in place of 'updateData').

Files:
M      WEB-INF/lps/lfc/services/LzUtils.lzs
M      WEB-INF/lps/lfc/core/LzNode.lzs
M      WEB-INF/lps/lfc/core/PresentationTypes.lzs
M      lps/components/lz/radio.lzx
M      lps/components/lz/simpletext.lzx
M      lps/components/lz/edittext.lzx
M      lps/components/incubator/labeledinputtext.lzx
M      lps/components/base/basecomponent.lzx
M      lps/components/base/basecombobox.lzx
M      lps/components/base/baselist.lzx
M      lps/components/base/baseslider.lzx
M      lps/components/base/baseformitem.lzx
M      lps/components/base/basevaluecomponent.lzx

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081115-ptw-x.tar


Reply via email to