[Laszlo-dev] For Review: 20081023-laszlo-2 Summary: edittext maxlength and pattern attributes need formal setters
J Crowley
jcrowley at laszlosystems.com
Thu Oct 23 15:18:18 PDT 2008
Change 20081023-laszlo-2 by laszlo at T43-L3XEXMW on 2008-10-23 18:01:01 EDT
in /home/laszlo/src/svn/openlaszlo/trunk-bigboss
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: edittext maxlength and pattern attributes need formal setters
New Features:
Bugs Fixed: LPP-7222 - edittext maxlength and pattern attributes need
formal setters
Technical Reviewer: promanik
QA Reviewer: henry
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Implemented contributor Gregory Denson's
suggested fix for the bug. Removed setMaxlength
and setPattern methods (since we're no longer
using setFoo() syntax) and replaced them with
setters for maxlength and pattern attributes.
Tests: Run the following in DHTML and SWF:
<canvas width="500" height="300">
<simplelayout axis="y"/>
<edittext name="foo" maxlength="50" width="300" height="200"
multiline="true"/>
<button onclick="Debug.write(canvas.foo.maxlength);
canvas.foo.setAttribute('maxlength', 100);
Debug.write(canvas.foo.maxlength)"/>
<button onclick="Debug.write(canvas.foo.pattern);
canvas.foo.setAttribute('pattern', '[a-z]*');
Debug.write(canvas.foo.pattern)"/>
</canvas>
Type into the field until you reach the limit.
Click the first button, and note the changed
values in the debugger. Type into the field
some more. It behaves as expected. Click the
second button. Type into the field. Try
using numbers and upper-case letters. It
should behave as expected.
Files:
M lps/components/lz/edittext.lzx
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/20081023-laszlo-2.tar
More information about the Laszlo-dev
mailing list