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/01 15:41:12 UTC

[royale-asjs] branch label_fix created (now 1b6170c)

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

yishayw pushed a change to branch label_fix
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.


      at 1b6170c  Fix for text input set label?

This branch includes the following new commits:

     new 1b6170c  Fix for text input set label?

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



Re: [royale-asjs] branch label_fix created (now 1b6170c)

Posted by Alex Harui <ah...@adobe.com.INVALID>.
The emulations often started from the actual Flex component.  The code in a method/getter/setter was often commented out to get things to compile.

Getting things to run is DAYG (do as you go).  When it is time to actually get some method/getter/setter to work again, some of the things to consider are:
-Are there beads and utility classes that can be leveraged to get it to work?  The emulation of UIComponent is a subclass of Basic components, so in many cases the right bead needs to be used or subclassed and modified a bit.  However, Spark TextInput is pretty unique because it and Spark TextArea were configured to use TLF/FTE so there may not be beads you can leverage.
- Is the commented out code useful?  It was in Charts and other places because once enough stuff in UIComponent and elsewhere started to work it was possible to reuse a lot of the Flex code that didn't have Flash dependencies.
- How much time will it take to "do the right thing"?

So the first question is: what is working today?  Do the Spark RichEditableText, TextInput and TextArea examples in tourdeflexmodules work?  If so, do they do leverage the TLF code or how do they display text?

While your changes probably work, the "right thing" would be to emulate IEditableText, uncomment the "textDisplay" in SkinnableTextBase and get most of that commented out code to work by calling the RichEditableText as the default textDisplay or however the working examples display their text.  That way the changes you make would work for Spark TextArea as well.

But if you only have so much time, then something is better than nothing.

HTH,
-Alex

On 8/1/19, 9:10 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:

    
    
    >Do I understand correctly that the commented code which I removed was never meant to be fully >implemented and we can add functionality as we go?
    
    I meant the code in SkinnableTextBase.text
    
    I didn’t remove it, just not relying on it.
    
    


RE: [royale-asjs] branch label_fix created (now 1b6170c)

Posted by Yishay Weiss <yi...@hotmail.com>.

>Do I understand correctly that the commented code which I removed was never meant to be fully >implemented and we can add functionality as we go?

I meant the code in SkinnableTextBase.text

I didn’t remove it, just not relying on it.


RE: [royale-asjs] branch label_fix created (now 1b6170c)

Posted by Yishay Weiss <yi...@hotmail.com>.
Alex,



Can u have a look at this branch? I want to make sure I’m doing the right thing before merging to develop. The fix is a simple copy and paste from the mx emulation component.



Do I understand correctly that the commented code which I removed was never meant to be fully implemented and we can add functionality as we go?



Elina needs this functionality in her app.



________________________________
From: yishayw@apache.org <yi...@apache.org>
Sent: Thursday, August 1, 2019 6:41:12 PM
To: commits@royale.apache.org <co...@royale.apache.org>
Subject: [royale-asjs] branch label_fix created (now 1b6170c)

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

yishayw pushed a change to branch label_fix
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.


      at 1b6170c  Fix for text input set label?

This branch includes the following new commits:

     new 1b6170c  Fix for text input set label?

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[royale-asjs] 01/01: Fix for text input set label?

Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch label_fix
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 1b6170c17f3e7922996bfbd63f655cd65545203a
Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
AuthorDate: Thu Aug 1 18:40:41 2019 +0300

    Fix for text input set label?
---
 .../src/main/royale/spark/components/TextInput.as          | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

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 46985d2..bd95fcb 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as
@@ -292,8 +292,18 @@ public class TextInput extends SkinnableTextBase
      */
     override public function set text(value:String):void
     {
-        super.text = value;
-        
+        COMPILE::SWF
+		{
+			inSetter = true;
+			ITextModel(model).text = value;
+			inSetter = false;
+		}
+		
+		COMPILE::JS
+		{
+			(element as HTMLInputElement).value = value;
+		}
+
         // Trigger bindings to textChanged.
         dispatchEvent(new Event("textChanged"));
     }