Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F1966200C66 for ; Sat, 15 Apr 2017 14:33:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F029A160B9D; Sat, 15 Apr 2017 12:33:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1BFB6160BA0 for ; Sat, 15 Apr 2017 14:33:06 +0200 (CEST) Received: (qmail 40121 invoked by uid 500); 15 Apr 2017 12:33:06 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 40028 invoked by uid 99); 15 Apr 2017 12:33:06 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Apr 2017 12:33:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 13A4BDFBB7; Sat, 15 Apr 2017 12:33:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pent@apache.org To: commits@flex.apache.org Date: Sat, 15 Apr 2017 12:33:06 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] git commit: [flex-asjs] [refs/heads/develop] - MobileTrader nearly back to full function. archived-at: Sat, 15 Apr 2017 12:33:08 -0000 MobileTrader nearly back to full function. Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/159abcc9 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/159abcc9 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/159abcc9 Branch: refs/heads/develop Commit: 159abcc9cc728108863be1bc07d3175711a4fd00 Parents: a005b67 Author: Peter Ent Authored: Sat Apr 15 08:32:58 2017 -0400 Committer: Peter Ent Committed: Sat Apr 15 08:32:58 2017 -0400 ---------------------------------------------------------------------- examples/flexjs/MobileTrader/build.xml | 17 ++++- .../src/main/flex/MobileTrader.mxml | 3 + .../src/main/flex/MyInitialView.mxml | 8 ++- .../flex/controller/DataModelChangeNotifier.as | 71 ++++++++++++++++++++ .../src/main/flex/views/AlertsView.mxml | 2 +- .../src/main/flex/views/WatchListView.mxml | 2 +- 6 files changed, 99 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/159abcc9/examples/flexjs/MobileTrader/build.xml ---------------------------------------------------------------------- diff --git a/examples/flexjs/MobileTrader/build.xml b/examples/flexjs/MobileTrader/build.xml index cb69a25..81fd570 100644 --- a/examples/flexjs/MobileTrader/build.xml +++ b/examples/flexjs/MobileTrader/build.xml @@ -48,7 +48,22 @@ - + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/159abcc9/examples/flexjs/MobileTrader/src/main/flex/MobileTrader.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/MobileTrader/src/main/flex/MobileTrader.mxml b/examples/flexjs/MobileTrader/src/main/flex/MobileTrader.mxml index c76531c..47acaeb 100755 --- a/examples/flexjs/MobileTrader/src/main/flex/MobileTrader.mxml +++ b/examples/flexjs/MobileTrader/src/main/flex/MobileTrader.mxml @@ -24,6 +24,9 @@ xmlns:js="library://ns.apache.org/flexjs/basic" xmlns:controller="controller.*" > + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/159abcc9/examples/flexjs/MobileTrader/src/main/flex/MyInitialView.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/MobileTrader/src/main/flex/MyInitialView.mxml b/examples/flexjs/MobileTrader/src/main/flex/MyInitialView.mxml index 70aea67..2357600 100755 --- a/examples/flexjs/MobileTrader/src/main/flex/MyInitialView.mxml +++ b/examples/flexjs/MobileTrader/src/main/flex/MyInitialView.mxml @@ -38,6 +38,11 @@ limitations under the License. background-color: #FFFFFF; } + .StringItemRenderer { + padding-left: 4px; + padding-top: 2px; + } + .NavigationBar { background-image: url("assets/background.png"); height: 55px; @@ -225,6 +230,7 @@ limitations under the License. private function onInitComplete():void { + } private function onAssetsNext():void @@ -260,7 +266,7 @@ limitations under the License. - + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/159abcc9/examples/flexjs/MobileTrader/src/main/flex/controller/DataModelChangeNotifier.as ---------------------------------------------------------------------- diff --git a/examples/flexjs/MobileTrader/src/main/flex/controller/DataModelChangeNotifier.as b/examples/flexjs/MobileTrader/src/main/flex/controller/DataModelChangeNotifier.as new file mode 100644 index 0000000..a6e2e19 --- /dev/null +++ b/examples/flexjs/MobileTrader/src/main/flex/controller/DataModelChangeNotifier.as @@ -0,0 +1,71 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// +package controller +{ + import org.apache.flex.core.IBead; + import org.apache.flex.core.IBeadModel; + import org.apache.flex.core.IStrand; + import org.apache.flex.events.Event; + import org.apache.flex.events.IEventDispatcher; + import org.apache.flex.events.EventDispatcher; + import org.apache.flex.events.CollectionEvent; + + public class DataModelChangeNotifier extends EventDispatcher implements IBead + { + public function DataModelChangeNotifier() + { + super(); + } + + private var _strand:IStrand; + private var _propertyName:String = "dataProvider"; + + public function get propertyName():String + { + return _propertyName; + } + public function set propertyName(value:String):void + { + _propertyName = value; + } + + public function set strand(value:IStrand):void + { + _strand = value; + + IEventDispatcher(_strand).addEventListener("initBindings", handleInitBindings); + } + + private function handleInitBindings(event:Event):void + { + var model:Object = _strand.getBeadByType(IBeadModel) as Object; + var property:IEventDispatcher = model[propertyName] as IEventDispatcher; + + property.addEventListener(CollectionEvent.ITEM_ADDED, handleModelChanges); + property.addEventListener(CollectionEvent.ITEM_REMOVED, handleModelChanges); + property.addEventListener(CollectionEvent.ITEM_UPDATED, handleModelChanges); + } + + private function handleModelChanges(event:CollectionEvent):void + { + var model:IEventDispatcher = _strand.getBeadByType(IBeadModel) as IEventDispatcher; + model.dispatchEvent(new Event("dataProviderChanged")); + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/159abcc9/examples/flexjs/MobileTrader/src/main/flex/views/AlertsView.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/MobileTrader/src/main/flex/views/AlertsView.mxml b/examples/flexjs/MobileTrader/src/main/flex/views/AlertsView.mxml index 71ddff6..fbb96e0 100755 --- a/examples/flexjs/MobileTrader/src/main/flex/views/AlertsView.mxml +++ b/examples/flexjs/MobileTrader/src/main/flex/views/AlertsView.mxml @@ -73,7 +73,7 @@ limitations under the License. - + - +