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 2020/08/11 19:10:44 UTC

[royale-asjs] branch develop updated: BE0015 : proxy properties in mxml to ease code example

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 8396c5f  BE0015 : proxy properties in mxml to ease code example
8396c5f is described below

commit 8396c5f838037a59aa8a474798b9d10d470c582b
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Aug 11 21:10:30 2020 +0200

    BE0015 : proxy properties in mxml to ease code example
---
 .../royale/BE0015_Using_Jewel_TileHorizontalLayout.mxml   | 15 ++++++++-------
 .../src/main/royale/vos/TabBarButtonVO.as                 |  5 +----
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/examples/blog/BE0015_Using_Jewel_TileHorizontalLayout/src/main/royale/BE0015_Using_Jewel_TileHorizontalLayout.mxml b/examples/blog/BE0015_Using_Jewel_TileHorizontalLayout/src/main/royale/BE0015_Using_Jewel_TileHorizontalLayout.mxml
index 459da1b..ace1c39 100644
--- a/examples/blog/BE0015_Using_Jewel_TileHorizontalLayout/src/main/royale/BE0015_Using_Jewel_TileHorizontalLayout.mxml
+++ b/examples/blog/BE0015_Using_Jewel_TileHorizontalLayout/src/main/royale/BE0015_Using_Jewel_TileHorizontalLayout.mxml
@@ -28,12 +28,6 @@
             import vos.TabBarButtonVO;
             import vos.IconListVO;
             import org.apache.royale.collections.ArrayList;
-
-            [Bindable]
-            public var tabBarData:ArrayList = new ArrayList([
-					new TabBarButtonVO("Tile Container", "sec1", FontAwesome5IconType.TH_LARGE),
-					new TabBarButtonVO("Tile List", "sec2", FontAwesome5IconType.TH_LIST)
-				]);
             
             [Bindable]
             public var listData:ArrayList = new ArrayList([
@@ -81,7 +75,14 @@
                 <j:CardExpandedContent>
                     <j:TabBar localId="tabbar" width="100%" selectedIndex="0"
                         itemRenderer="itemRenderers.TabBarVerticalIconItemRenderer"
-                        dataProvider="{tabBarData}" sameWidths="true"/>
+                        sameWidths="true">
+                        <js:ArrayList>
+                            <fx:Array>
+                                <vos:TabBarButtonVO label="Tile Container" hash="sec1" icon="{FontAwesome5IconType.TH_LARGE}"/>
+                                <vos:TabBarButtonVO label="Tile List" hash="sec2" icon="{FontAwesome5IconType.TH_LIST}"/>
+                            </fx:Array>
+                        </js:ArrayList>
+                    </j:TabBar>
                 </j:CardExpandedContent>
 
                 <j:CardPrimaryContent>
diff --git a/examples/blog/BE0015_Using_Jewel_TileHorizontalLayout/src/main/royale/vos/TabBarButtonVO.as b/examples/blog/BE0015_Using_Jewel_TileHorizontalLayout/src/main/royale/vos/TabBarButtonVO.as
index 9b22fe8..1c4f9bf 100644
--- a/examples/blog/BE0015_Using_Jewel_TileHorizontalLayout/src/main/royale/vos/TabBarButtonVO.as
+++ b/examples/blog/BE0015_Using_Jewel_TileHorizontalLayout/src/main/royale/vos/TabBarButtonVO.as
@@ -25,11 +25,8 @@ package vos
         public var hash:String;
         public var icon:String;
 
-        public function TabBarButtonVO(label:String, hash:String, icon:String = null)
+        public function TabBarButtonVO()
         {
-            this.label = label;
-            this.hash = hash;
-            this.icon = icon;
         }
     }
 }