You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2015/11/20 21:19:03 UTC
[14/41] git commit: [flex-asjs] [refs/heads/core_js_to_as] -
MobileTrader example now fully operational.
MobileTrader example now fully operational.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/258e6923
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/258e6923
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/258e6923
Branch: refs/heads/core_js_to_as
Commit: 258e69239b4d4a839c047e05c14903b1e5e80101
Parents: 2997078
Author: Peter Ent <pe...@apache.org>
Authored: Thu Oct 8 15:25:40 2015 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Thu Oct 8 15:25:40 2015 -0400
----------------------------------------------------------------------
.../flexjs/MobileTrader/src/controller/AlertsViewController.as | 1 +
examples/flexjs/MobileTrader/src/models/ProductsModel.as | 3 ++-
examples/flexjs/MobileTrader/src/views/AlertsView.mxml | 2 +-
examples/flexjs/MobileTrader/src/views/WatchListView.mxml | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258e6923/examples/flexjs/MobileTrader/src/controller/AlertsViewController.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/controller/AlertsViewController.as b/examples/flexjs/MobileTrader/src/controller/AlertsViewController.as
index 254cd18..f8373ca 100644
--- a/examples/flexjs/MobileTrader/src/controller/AlertsViewController.as
+++ b/examples/flexjs/MobileTrader/src/controller/AlertsViewController.as
@@ -131,6 +131,7 @@ package controller
alert.message = "Now @"+alert.stock.last;
}
}
+ alerts.itemUpdatedAt(i);
}
var newEvent:Event = new Event("alertsUpdate");
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258e6923/examples/flexjs/MobileTrader/src/models/ProductsModel.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/models/ProductsModel.as b/examples/flexjs/MobileTrader/src/models/ProductsModel.as
index b6f91ad..f4b2008 100755
--- a/examples/flexjs/MobileTrader/src/models/ProductsModel.as
+++ b/examples/flexjs/MobileTrader/src/models/ProductsModel.as
@@ -108,7 +108,7 @@ package models
stock = new Stock(symbol);
_watchList.addItem(stock);
- dispatchEvent(new Event("update"));
+ // dispatchEvent(new Event("update"));
updateStockData(stock);
return stock;
@@ -156,6 +156,7 @@ package models
var stock:Stock = _watchList.getItemAt(i) as Stock;
if (stock.symbol == sym) {
stock.updateFromData(responseData);
+ _watchList.itemUpdatedAt(i);
break;
}
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258e6923/examples/flexjs/MobileTrader/src/views/AlertsView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/views/AlertsView.mxml b/examples/flexjs/MobileTrader/src/views/AlertsView.mxml
index 96c9b86..3bc76bb 100755
--- a/examples/flexjs/MobileTrader/src/views/AlertsView.mxml
+++ b/examples/flexjs/MobileTrader/src/views/AlertsView.mxml
@@ -48,7 +48,6 @@ limitations under the License.
private function onAlertSet():void
{
dispatchEvent(new org.apache.flex.events.Event("alertSet"));
- dataGrid.model.dispatchEvent(new org.apache.flex.events.Event("dataProviderChanged"));
}
]]>
</fx:Script>
@@ -67,6 +66,7 @@ limitations under the License.
<js:DataGrid id="dataGrid" x="0" y="40" width="100%" height="200">
<js:beads>
+ <js:DataProviderChangeNotifier sourceID="dataModel" propertyName="alerts" />
<js:SimpleBinding
eventName="alertsUpdate"
sourceID="dataModel"
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258e6923/examples/flexjs/MobileTrader/src/views/WatchListView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/views/WatchListView.mxml b/examples/flexjs/MobileTrader/src/views/WatchListView.mxml
index ec70e59..46c7434 100755
--- a/examples/flexjs/MobileTrader/src/views/WatchListView.mxml
+++ b/examples/flexjs/MobileTrader/src/views/WatchListView.mxml
@@ -60,7 +60,6 @@ limitations under the License.
private function addSymbol():void
{
dispatchEvent(new org.apache.flex.events.Event("addSymbol"));
- dataGrid.model.dispatchEvent(new org.apache.flex.events.Event("dataProviderChanged"));
}
public var selectedStockIndex:Number;
@@ -103,6 +102,7 @@ limitations under the License.
<js:DataGrid id="dataGrid" width="100%" height="85%" change="selectRow()" className="WatchListDataGrid">
<js:beads>
+ <js:DataProviderChangeNotifier sourceID="dataModel" propertyName="watchList" />
<js:SimpleBinding
eventName="update"
sourceID="dataModel"