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 2020/03/29 12:21:28 UTC

[royale-asjs] branch develop updated: Make sure mx combobox shows label

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 8a6ff88  Make sure mx combobox shows label
     new 80767c5  Merge branch 'develop' of https://gitbox.apache.org/repos/asf/royale-asjs into develop
8a6ff88 is described below

commit 8a6ff883666c978229b77b97ae3e5fe7e961e4f5
Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
AuthorDate: Sat Mar 28 20:29:45 2020 +0300

    Make sure mx combobox shows label
---
 .../MXRoyale/src/main/royale/mx/controls/ComboBox.as     | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
index 26d75c6..6c4225f 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
@@ -25,6 +25,7 @@ import mx.controls.listClasses.BaseListData;
 import mx.events.FlexEvent;
 
 import org.apache.royale.html.beads.IComboBoxView;
+import org.apache.royale.core.ISelectionModel;
 
 COMPILE::SWF
 {
@@ -656,6 +657,8 @@ public class ComboBox extends ComboBase
     public function ComboBox()
     {
         super();
+        if((model as ISelectionModel).labelField == null) 
+			labelField =  "label";
 
         // It it better to start out with an empty data provider rather than
         // an undefined one. Otherwise, code in getDropdown() sets it to []
@@ -672,10 +675,15 @@ public class ComboBox extends ComboBase
     //
     //--------------------------------------------------------------------------
 
-    /**
-     * @royalesuppresspublicvarwarning
-     */
-    public var labelField:String = "label";
+    public function get labelField():String
+    {
+        return (model as ISelectionModel).labelField;
+    }
+
+    public function set labelField(value:String):void
+    {
+        (model as ISelectionModel).labelField = value;
+    }
     
     //--------------------------------------------------------------------------
     //


RE: [royale-asjs] branch develop updated: Make sure mx combobox shows label

Posted by Yishay Weiss <yi...@hotmail.com>.
Fair enough. I copied that from the spark implementation, maybe they could both use refactoring.

From: Alex Harui<ma...@adobe.com.INVALID>
Sent: Sunday, March 29, 2020 11:07 PM
To: dev@royale.apache.org<ma...@royale.apache.org>; commits@royale.apache.org<ma...@royale.apache.org>
Subject: Re: [royale-asjs] branch develop updated: Make sure mx combobox shows label

I'm not sure this is the "right" fix.  Accessing model in a constructor eliminates a bunch of ways of swapping out a model (such as in the beads array).

-Alex

On 3/29/20, 5:21 AM, "yishayw@apache.org" <yi...@apache.org> wrote:

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

    yishayw pushed a commit to branch develop
    in repository https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&amp;data=02%7C01%7Caharui%40adobe.com%7C68d95d3b9c3542e17e3608d7d3dbb5bf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637210812914161239&amp;sdata=Tlh2u903Pdjbm%2B%2FbVn2b9%2BGaRi0MAIqiNtiy%2BjAjdew%3D&amp;reserved=0


    The following commit(s) were added to refs/heads/develop by this push:
         new 8a6ff88  Make sure mx combobox shows label
         new 80767c5  Merge branch 'develop' of https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs&amp;data=02%7C01%7Caharui%40adobe.com%7C68d95d3b9c3542e17e3608d7d3dbb5bf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637210812914161239&amp;sdata=%2FrTM4G2sAbk8tan4ewyvUUU7szRQlKyKOV%2FGLZFZnhE%3D&amp;reserved=0 into develop
    8a6ff88 is described below

    commit 8a6ff883666c978229b77b97ae3e5fe7e961e4f5
    Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
    AuthorDate: Sat Mar 28 20:29:45 2020 +0300

        Make sure mx combobox shows label
    ---
     .../MXRoyale/src/main/royale/mx/controls/ComboBox.as     | 16 ++++++++++++----
     1 file changed, 12 insertions(+), 4 deletions(-)

    diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
    index 26d75c6..6c4225f 100644
    --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
    +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
    @@ -25,6 +25,7 @@ import mx.controls.listClasses.BaseListData;
     import mx.events.FlexEvent;

     import org.apache.royale.html.beads.IComboBoxView;
    +import org.apache.royale.core.ISelectionModel;

     COMPILE::SWF
     {
    @@ -656,6 +657,8 @@ public class ComboBox extends ComboBase
         public function ComboBox()
         {
             super();
    +        if((model as ISelectionModel).labelField == null)
    +                   labelField =  "label";

             // It it better to start out with an empty data provider rather than
             // an undefined one. Otherwise, code in getDropdown() sets it to []
    @@ -672,10 +675,15 @@ public class ComboBox extends ComboBase
         //
         //--------------------------------------------------------------------------

    -    /**
    -     * @royalesuppresspublicvarwarning
    -     */
    -    public var labelField:String = "label";
    +    public function get labelField():String
    +    {
    +        return (model as ISelectionModel).labelField;
    +    }
    +
    +    public function set labelField(value:String):void
    +    {
    +        (model as ISelectionModel).labelField = value;
    +    }

         //--------------------------------------------------------------------------
         //




Re: [royale-asjs] branch develop updated: Make sure mx combobox shows label

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I'm not sure this is the "right" fix.  Accessing model in a constructor eliminates a bunch of ways of swapping out a model (such as in the beads array).

-Alex

On 3/29/20, 5:21 AM, "yishayw@apache.org" <yi...@apache.org> wrote:

    This is an automated email from the ASF dual-hosted git repository.
    
    yishayw pushed a commit to branch develop
    in repository https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&amp;data=02%7C01%7Caharui%40adobe.com%7C68d95d3b9c3542e17e3608d7d3dbb5bf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637210812914161239&amp;sdata=Tlh2u903Pdjbm%2B%2FbVn2b9%2BGaRi0MAIqiNtiy%2BjAjdew%3D&amp;reserved=0
    
    
    The following commit(s) were added to refs/heads/develop by this push:
         new 8a6ff88  Make sure mx combobox shows label
         new 80767c5  Merge branch 'develop' of https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs&amp;data=02%7C01%7Caharui%40adobe.com%7C68d95d3b9c3542e17e3608d7d3dbb5bf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637210812914161239&amp;sdata=%2FrTM4G2sAbk8tan4ewyvUUU7szRQlKyKOV%2FGLZFZnhE%3D&amp;reserved=0 into develop
    8a6ff88 is described below
    
    commit 8a6ff883666c978229b77b97ae3e5fe7e961e4f5
    Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
    AuthorDate: Sat Mar 28 20:29:45 2020 +0300
    
        Make sure mx combobox shows label
    ---
     .../MXRoyale/src/main/royale/mx/controls/ComboBox.as     | 16 ++++++++++++----
     1 file changed, 12 insertions(+), 4 deletions(-)
    
    diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
    index 26d75c6..6c4225f 100644
    --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
    +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
    @@ -25,6 +25,7 @@ import mx.controls.listClasses.BaseListData;
     import mx.events.FlexEvent;
     
     import org.apache.royale.html.beads.IComboBoxView;
    +import org.apache.royale.core.ISelectionModel;
     
     COMPILE::SWF
     {
    @@ -656,6 +657,8 @@ public class ComboBox extends ComboBase
         public function ComboBox()
         {
             super();
    +        if((model as ISelectionModel).labelField == null) 
    +			labelField =  "label";
     
             // It it better to start out with an empty data provider rather than
             // an undefined one. Otherwise, code in getDropdown() sets it to []
    @@ -672,10 +675,15 @@ public class ComboBox extends ComboBase
         //
         //--------------------------------------------------------------------------
     
    -    /**
    -     * @royalesuppresspublicvarwarning
    -     */
    -    public var labelField:String = "label";
    +    public function get labelField():String
    +    {
    +        return (model as ISelectionModel).labelField;
    +    }
    +
    +    public function set labelField(value:String):void
    +    {
    +        (model as ISelectionModel).labelField = value;
    +    }
         
         //--------------------------------------------------------------------------
         //