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 09:14:04 UTC

[royale-asjs] branch develop updated: change addItem in table 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 75f379c  change addItem in table example
75f379c is described below

commit 75f379c72732cd208f535f6f029cfc0b2efe0ee4
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Aug 31 11:13:59 2018 +0200

    change addItem in table example
---
 examples/royale/JewelExample/src/main/royale/TablePlayGround.mxml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/royale/JewelExample/src/main/royale/TablePlayGround.mxml b/examples/royale/JewelExample/src/main/royale/TablePlayGround.mxml
index b176061..60a3d4b 100644
--- a/examples/royale/JewelExample/src/main/royale/TablePlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/TablePlayGround.mxml
@@ -241,8 +241,8 @@ limitations under the License.
 
 			private function addItem():void
 			{
-				(table.dataProvider as ArrayList).addItem({icon: MaterialIconType.CLOSE, guitarrist: "Eric Johnson", album: "Venus Isle", year: "1996"});
-				// tablesModel.guitarrists.addItem({icon: MaterialIconType.CLOSE, guitarrist: "Eric Johnson", album: "Venus Isle", year: "1996"}); // to test things are adding to right place
+				(table.dataProvider as ArrayList).addItem(new GuitarristVO("Eric Johnson", "Venus Isle", 1996));
+				// tablesModel.guitarrists.addItem(new GuitarristVO("Eric Johnson", "Venus Isle", 1996)); // to test things are adding to right place
 			}
 
 			public function removeItemAt():void
@@ -253,7 +253,7 @@ limitations under the License.
 
 			public function updateFirstItem():void
 			{
-				var item:Object = (table.dataProvider as ArrayList).getItemAt(0);
+				var item:GuitarristVO = (table.dataProvider as ArrayList).getItemAt(0) as GuitarristVO;
 				item.guitarrist = "Mango";
 				item.year = 2001;
 				(table.dataProvider as ArrayList).itemUpdated(item);