Oh, sorry, I guess I fixed that but failed to update the changeset.

I'm going to check in, because I think I've addressed your comments and this is now stable. But also see my post about Presentation Types and New Components -- this implementation is really just a rough draft (and hence not public).

On 2008-11-17, at 14:02EST, André Bargull wrote:


On 11/17/2008 6:19 PM, P T Withington wrote:
On 2008-11-17, at 09:58EST, André Bargull wrote:
basevaluecomponent.lzx - bad dependencies-function "$lzc $getValue_dependencies"
I don't see the error here.  Please explain?

Just because of the arguments as "...ignore" whereas for instance in lz.edittext the arguments are "who, self". And for as3, we're forced to have the same function signature.


(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