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/01/03 17:45:07 UTC
[royale-asjs] branch develop updated: tour-de-jewel: update 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 97293db tour-de-jewel: update table example
97293db is described below
commit 97293db341a012eada86f7ce437e7e38b8e922e7
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Jan 3 18:42:11 2020 +0100
tour-de-jewel: update table example
---
.../src/main/royale/TablePlayGround.mxml | 26 +++++++++++-----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/examples/royale/TourDeJewel/src/main/royale/TablePlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/TablePlayGround.mxml
index ad5a643..dbe51fd 100644
--- a/examples/royale/TourDeJewel/src/main/royale/TablePlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/TablePlayGround.mxml
@@ -179,7 +179,7 @@ limitations under the License.
<j:GridCell desktopNumerator="1" desktopDenominator="1" tabletNumerator="1" tabletDenominator="1" phoneNumerator="1" phoneDenominator="1">
<j:Card>
- <html:H3 text="Jewel Table (This component is still in development)"/>
+ <html:H3 text="Jewel Table"/>
<j:HGroup gap="3">
<j:VGroup gap="3">
<j:Table id="table" change="onChange(event)" dataProvider="{tablesModel.guitarrists}">
@@ -198,12 +198,12 @@ limitations under the License.
</j:VGroup>
<j:VGroup gap="3">
<j:Button click="changeTableData()" text="Change Data" emphasis="primary"/>
- <j:Button text="Add item" click="addItem()"/>
- <j:Button text="Remove first item" click="removeItemAt()"/>
- <j:Button text="Update first item" click="updateFirstItem()"/>
+ <j:Button text="Add Row (item)" click="addItem()"/>
+ <j:Button text="Remove first row (item)" click="removeItemAt()"/>
+ <j:Button text="Update first row (item)" click="updateFirstItem()"/>
<j:Button text="Remove all data" click="removeAllData()"/>
<j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
- <j:Label text="Select table by index: "/>
+ <j:Label text="Select table cell by index: "/>
<j:NumericStepper valueChange="table.selectedIndex = event.target.value" minimum="0"/>
</j:HGroup>
<!-- <j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
@@ -238,14 +238,14 @@ limitations under the License.
private function addItem():void
{
- (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
+ //(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
{
- (table.dataProvider as ArrayList).removeItemAt(0);
- // tablesModel.guitarrists.removeItemAt(0);
+ // (table.dataProvider as ArrayList).removeItemAt(0);
+ tablesModel.guitarrists.removeItemAt(0);
}
public function updateFirstItem():void
@@ -253,14 +253,14 @@ limitations under the License.
var item:GuitarristVO = (table.dataProvider as ArrayList).getItemAt(0) as GuitarristVO;
item.guitarrist = "Robert Frip";
item.year = 1980;
- (table.dataProvider as ArrayList).itemUpdated(item);
- // tablesModel.guitarrists.itemUpdated(item);
+ // (table.dataProvider as ArrayList).itemUpdated(item);
+ tablesModel.guitarrists.itemUpdated(item);
}
public function removeAllData():void
{
- (table.dataProvider as ArrayList).removeAll();
- // tablesModel.guitarrists.removeAll();
+ // (table.dataProvider as ArrayList).removeAll();
+ tablesModel.guitarrists.removeAll();
}
]]>
</fx:Script>