You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2019/08/03 06:28:54 UTC

[royale-asjs] branch develop updated: Add spark TextInput.text read

This is an automated email from the ASF dual-hosted git repository.

yishayw 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 ee2a7e3  Add spark TextInput.text read
ee2a7e3 is described below

commit ee2a7e37df59f35f8ae9e7016df65f8cb0ce80d6
Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
AuthorDate: Sat Aug 3 09:18:22 2019 +0300

    Add spark TextInput.text read
---
 .../src/main/royale/spark/components/TextInput.as    | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as
index 26c0ab5..9dfbda9 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as
@@ -293,6 +293,7 @@ public class TextInput extends SkinnableTextBase
      */
     override public function set text(value:String):void
     {
+        // BEGIN - this code shouldn't exist once SkinnableTextBase is fixed
         COMPILE::SWF
 		{
 			inSetter = true;
@@ -304,10 +305,29 @@ public class TextInput extends SkinnableTextBase
 		{
 			(element as HTMLInputElement).value = value;
 		}
+        // END
 
+        super.text = value;
         // Trigger bindings to textChanged.
         dispatchEvent(new Event("textChanged"));
     }
+
+    // BEGIN - this code shouldn't exist once SkinnableTextBase is fixed
+    /**
+     *  @private
+     */
+    override public function get text():String
+    {
+        COMPILE::SWF
+		{
+			return ITextModel(model).text;
+		}
+		COMPILE::JS
+		{
+			return (element as HTMLInputElement).value;
+		}
+    }
+    // END
     
     COMPILE::JS
 	override protected function createElement():WrappedHTMLElement