[Laszlo-dev] For Review: Change 20090113-ptw-z Summary: Improve presentation types
André Bargull
andre.bargull at udo.edu
Tue Jan 13 09:46:21 PST 2009
"NumberPresentationType" uses now `Number(..)` to parse a string to a
number, whereas "SizePresentationType" uses `parseFloat(..)`.
We should only use one of both alternatives, or it gets a bit chaotic
for users, e.g:
- `Number("")` is `0` (only in dhtml, in swf8 it's also NaN)
- but `parseFloat("")` is `NaN`
- `Number("0xa")` is 10
- `parseFloat("0xa")` is 0
and so forth..
Otherwise approved!
On 1/13/2009 4:37 PM, P T Withington wrote:
> Change 20090113-ptw-z by ptw at dueling-banjos.home on 2009-01-13
> 10:24:32 EST
> in /Users/ptw/OpenLaszlo/trunk
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Improve presentation types
>
> Bugs Fixed: LPP-7622 StringPresentationType required
>
> Technical Reviewer: a.bargull at intensis.de (pending)
> QA Reviewer: max (pending)
> Doc Reviewer: lou (pending)
>
> Details:
> smokecheck, presentation-types: Andre's new test
>
> LzNode: Add StringPresentationType to mapping table, remove
> GenericPresentationType and signal an error if an unknown type
> conversion is requested.
>
> PresentationTypes: Add StringPresentationType. Use explicit
> rather than implicit coercions for legibility. Remove
> GenericPresentationType: it's a bad idea to call random
> constructors with random arguments. Add the empty string as a
> possible false value for BooleanPresentationType. Correct
> NumberPresentationType to allow non-integers.
>
> Tests:
> Added Andre's test from bug to smokecheck and ran smokecheck
>
> Files:
> M test/smoke/smokecheck.lzx
> A test/smoke/presentation-types.lzl
> M WEB-INF/lps/lfc/core/LzNode.lzs
> M WEB-INF/lps/lfc/core/PresentationTypes.lzs
>
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20090113-ptw-z.tar
>
More information about the Laszlo-dev
mailing list