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 <[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;
+ }
//--------------------------------------------------------------------------
//