You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2018/08/31 00:06:37 UTC
[royale-asjs] branch develop updated: fix another example problem
due to untyped objects not doing the binding in release mode
This is an automated email from the ASF dual-hosted git repository.
carlosrovira 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 50ae01f fix another example problem due to untyped objects not doing the binding in release mode
50ae01f is described below
commit 50ae01f9d4c060d93d1943c22fcbaed608c9d021
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Aug 31 02:06:29 2018 +0200
fix another example problem due to untyped objects not doing the binding in release mode
---
.../src/main/royale/DropDownListPlayGround.mxml | 8 ++---
.../src/main/royale/models/ListsModel.as | 39 +++++++++++-----------
.../projects/Jewel/src/main/resources/defaults.css | 8 ++---
3 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml
index 568246d..b5f133d 100644
--- a/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/DropDownListPlayGround.mxml
@@ -34,11 +34,11 @@ limitations under the License.
}
private function avengersDropDownListHandler(event:Event):void {
- avengersDropDownListResult.html = "<strong>DropDownList selectedItem:</strong> " + event.target.selectedItem.nickname;
+ avengersDropDownListResult.html = "<strong>DropDownList selectedItem:</strong> " + event.target.selectedItem.label;
}
private function avengersComboBoxSelectedItem(event:Event):void {
- avengersComboBoxResult.html = "<strong>ComboBox selectedItem:</strong> " + event.target.selectedItem.nickname;
+ avengersComboBoxResult.html = "<strong>ComboBox selectedItem:</strong> " + event.target.selectedItem.label;
}
]]>
</fx:Script>
@@ -101,7 +101,7 @@ limitations under the License.
<html:H3 text="Jewel DropDownList (Object Collection)"/>
<j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
- <j:DropDownList id="avengersDropDownList" labelField="nickname" dataProvider="{listModel.avengers}" change="avengersDropDownListHandler(event)"/>
+ <j:DropDownList id="avengersDropDownList" labelField="label" dataProvider="{listModel.avengers}" change="avengersDropDownListHandler(event)"/>
<j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
<j:Label text="Select Index: "/>
<j:NumericStepper valueChange="avengersDropDownList.selectedIndex = event.target.value" minimum="0" maximum="8"/>
@@ -122,7 +122,7 @@ limitations under the License.
<html:H3 text="Jewel ComboBox (Object Collection)"/>
<j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
- <j:ComboBox id="avengersComboBox" labelField="nickname" dataProvider="{listModel.avengers}" change="avengersComboBoxSelectedItem(event)"/>
+ <j:ComboBox id="avengersComboBox" labelField="label" dataProvider="{listModel.avengers}" change="avengersComboBoxSelectedItem(event)"/>
<j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
<j:Label text="Select Index: "/>
<j:NumericStepper valueChange="avengersComboBox.selectedIndex = event.target.value" minimum="0" maximum="8"/>
diff --git a/examples/royale/JewelExample/src/main/royale/models/ListsModel.as b/examples/royale/JewelExample/src/main/royale/models/ListsModel.as
index b76d480..7fce824 100644
--- a/examples/royale/JewelExample/src/main/royale/models/ListsModel.as
+++ b/examples/royale/JewelExample/src/main/royale/models/ListsModel.as
@@ -42,16 +42,17 @@ package models
}
private var _avengers:ArrayList = new ArrayList([
- {nickname: "Iron Man", value: 0},
- {nickname: "Hulk", value: 1},
- {nickname: "Thor", value: 2},
- {nickname: "Captain America", value: 3},
- {nickname: "Black Widow", value: 4},
- {nickname: "Hawkeye", value: 5},
- {nickname: "Vision", value: 6},
- {nickname: "Scarlet Witch", value: 7},
- {nickname: "Spiderman", value: 8}
+ new IconListVO("Iron Man", MaterialIconType.WEB_ASSET),
+ new IconListVO("Hulk", MaterialIconType.WEB_ASSET),
+ new IconListVO("Thor", MaterialIconType.WEB_ASSET),
+ new IconListVO("Captain America", MaterialIconType.WEB_ASSET),
+ new IconListVO("Black Widow", MaterialIconType.WEB_ASSET),
+ new IconListVO("Hawkeye", MaterialIconType.WEB_ASSET),
+ new IconListVO("Vision", MaterialIconType.WEB_ASSET),
+ new IconListVO("Scarlet Witch", MaterialIconType.WEB_ASSET),
+ new IconListVO("Spiderman", MaterialIconType.WEB_ASSET)
]);
+
public function get avengers():ArrayList
{
return _avengers;
@@ -63,16 +64,16 @@ package models
* Used in the List example.
*/
private var _iconListData:ArrayList = new ArrayList([
- new IconListVO("Alert", "web_asset"),
- new IconListVO("Button", "crop_7_5"),
- new IconListVO("DropDownList", "credit_card"),
- new IconListVO("CheckBox", "check_box"),
- new IconListVO("Label", "label"),
- new IconListVO("List", "list_alt"),
- new IconListVO("RadioButton", "radio_button_checked"),
- new IconListVO("Slider", "storage"),
- new IconListVO("Text", "subject"),
- new IconListVO("TextInput", "text_fields")
+ new IconListVO("Alert", MaterialIconType.WEB_ASSET),
+ new IconListVO("Button", MaterialIconType.CROP_7_5),
+ new IconListVO("DropDownList", MaterialIconType.CREDIT_CARD),
+ new IconListVO("CheckBox", MaterialIconType.CHECK_BOX),
+ new IconListVO("Label", MaterialIconType.LABEL),
+ new IconListVO("List", MaterialIconType.LIST_ALT),
+ new IconListVO("RadioButton", MaterialIconType.RADIO_BUTTON_CHECKED),
+ new IconListVO("Slider", MaterialIconType.STORAGE),
+ new IconListVO("Text", MaterialIconType.SUBJECT),
+ new IconListVO("TextInput", MaterialIconType.TEXT_FIELDS)
]);
public function get iconListData():ArrayList
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index dbc87f0..2c75ee8 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -586,14 +586,14 @@ j|DropDownList {
cursor: inherit;
}
-.jewel.navigationlink {
- min-height: 48px;
-}
-
j|ListItemRenderer {
IBeadController: ClassReference("org.apache.royale.jewel.beads.controllers.ItemRendererMouseController");
}
+.jewel.navigationlink {
+ min-height: 48px;
+}
+
j|NavigationLinkItemRenderer {
IBeadController: ClassReference("org.apache.royale.jewel.beads.controllers.ItemRendererMouseController");
}