This is an automated email from the ASF dual-hosted git repository.
gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new ef4630b allow runtime updates (e.g. binding) to maxLength in
MaxNumberCharacters bead
ef4630b is described below
commit ef4630b2d03fcb18011f186f77852832193086d6
Author: greg-dove <[email protected]>
AuthorDate: Mon May 18 23:35:41 2020 +1200
allow runtime updates (e.g. binding) to maxLength in MaxNumberCharacters
bead
---
.../jewel/beads/controls/textinput/MaxNumberCharacters.as | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/textinput/MaxNumberCharacters.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/textinput/MaxNumberCharacters.as
index 2a03180..7d10f79 100644
---
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/textinput/MaxNumberCharacters.as
+++
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/textinput/MaxNumberCharacters.as
@@ -62,14 +62,28 @@ package org.apache.royale.jewel.beads.controls.textinput
* @playerversion Flash 10.2
* @playerversion AIR 2.6
* @productversion Royale 0.9.4
+ *
*/
public function get maxlength():Number
{
return _maxlength;
}
+
+ /**
+ *
+ * @royaleignorecoercion org.apache.royale.core.UIBase
+ * @royaleignorecoercion HTMLInputElement
+ */
public function set maxlength(value:Number):void
{
_maxlength = value;
+
+ if (_strand) {
+ COMPILE::JS{
+ var e:HTMLInputElement = (_strand as
UIBase).element as HTMLInputElement;
+ e.setAttribute("maxlength", value);
+ }
+ }
}
protected var _strand:IStrand;