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 37dd695 tour-de-jewel: fix some little issues when selecting and
showing item properties in lists
37dd695 is described below
commit 37dd69500cf67f1b2e7830016881109ffc509fe7
Author: Carlos Rovira <[email protected]>
AuthorDate: Mon Feb 10 18:28:25 2020 +0100
tour-de-jewel: fix some little issues when selecting and showing item
properties in lists
---
.../src/main/royale/AdvancedListPlayGround.mxml | 27 +++-------------------
.../src/main/royale/ListPlayGround.mxml | 6 ++---
.../src/main/royale/VirtualListsPlayGround.mxml | 4 ++--
3 files changed, 8 insertions(+), 29 deletions(-)
diff --git
a/examples/royale/TourDeJewel/src/main/royale/AdvancedListPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/AdvancedListPlayGround.mxml
index 1c80c2e..48f1811 100644
--- a/examples/royale/TourDeJewel/src/main/royale/AdvancedListPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/AdvancedListPlayGround.mxml
@@ -128,30 +128,10 @@ limitations under the License.
(advancedIconList.dataProvider as
ArrayList).removeAll();
}
-/* private function describeItem(item:*):String {
- const intro:String = "<strong>List
selectedItem:</strong> ";
- var evaluated:String;
- if (item is String) {
- evaluated = 'String value: \'' + item +
'\'';
- } else {
- if (item === null || item ===
undefined) {
- evaluated = '[Nothing Selected]'
- }
- else {
- if (item is DetailIconListVO) {
- evaluated = 'Object\'s
label field: \'' + DetailIconListVO(item).label + '\'';
- } else {
- evaluated = 'Object : '
+ item;
- }
- }
- }
- return intro + evaluated;
- }*/
-
public function
describeIconItem(iconObject:Object):String{
const iconVO:DetailIconListVO = iconObject as
DetailIconListVO;
- if (!iconVO) return '[Nothing Selected]';
- return 'componentSet:\'' + iconVO.componentSet
+ '\', label:\'' + iconVO.label + '\', icon:\'' + iconVO.icon + '\'';
+ if (!iconVO) return 'Nothing Selected';
+ return 'componentSet:"' + iconVO.componentSet +
'", label:"' + iconVO.label + '", icon:"' + iconVO.icon + '"';
}
]]>
@@ -166,8 +146,7 @@ limitations under the License.
</c:beads>
<j:Grid gap="true" itemsVerticalAlign="itemsSameHeight">
-
-
+
<j:GridCell desktopNumerator="1" desktopDenominator="1"
tabletNumerator="1" tabletDenominator="1" phoneNumerator="1"
phoneDenominator="1">
<j:Card>
<html:H3 text="Jewel List with ArrayList
(source) DataProvider"/>
diff --git a/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
index 6563ab3..f6693f1 100644
--- a/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
@@ -100,7 +100,7 @@ limitations under the License.
evaluated = "String value: '" + item +
"'";
} else {
if (item === null || item ===
undefined) {
- evaluated = "Nothing Selected]";
+ evaluated = "Nothing Selected";
}
else {
if (item is IconListVO) {
@@ -115,8 +115,8 @@ limitations under the License.
public function
describeIconItem(iconObject:Object):String{
const iconVO:IconListVO = iconObject as
IconListVO;
- if (!iconVO) return '[Nothing Selected]';
- return 'label:\'' + iconVO.label + '\',
icon:\'' + iconVO.icon + '\'';
+ if (!iconVO) return 'Nothing Selected';
+ return 'label:"' + iconVO.label + '", icon:"' +
iconVO.icon + '"';
}
// private function traceCollectionLabels():void
diff --git
a/examples/royale/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
index 0a04136..18aff8b 100644
--- a/examples/royale/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
@@ -26,10 +26,10 @@ limitations under the License.
<fx:Script>
<![CDATA[
- import vos.IconListVO;
import org.apache.royale.collections.ArrayList;
import org.apache.royale.core.StyledUIBase;
+ import vos.IconListVO;
private function addItemToVirtual():void
{
@@ -67,7 +67,7 @@ limitations under the License.
evaluated = "String value: '" + item + "'";
} else {
if (item === null || item === undefined) {
- evaluated = "Nothing Selected]";
+ evaluated = "Nothing Selected";
}
else {
if (item is IconListVO) {