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, "[email protected]" <[email protected]> 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 <[email protected]>
    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;
    +    }
         
         
//--------------------------------------------------------------------------
         //
    
    

Reply via email to