flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pio...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - - Fix build: Forgot commit some changes in DataProviderNotifierBase
Date Sun, 09 Apr 2017 16:40:56 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 83f4225c2 -> 61c4300d0


- Fix build: Forgot commit some changes in DataProviderNotifierBase


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/61c4300d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/61c4300d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/61c4300d

Branch: refs/heads/develop
Commit: 61c4300d0bf46c2a7901b04c5da593b8217a2efd
Parents: 83f4225
Author: piotrz <piotrz@apache.org>
Authored: Sun Apr 9 18:40:52 2017 +0200
Committer: piotrz <piotrz@apache.org>
Committed: Sun Apr 9 18:40:52 2017 +0200

----------------------------------------------------------------------
 .../supportClasses/DataProviderNotifierBase.as  | 37 +++++---------------
 1 file changed, 8 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/61c4300d/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataProviderNotifierBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataProviderNotifierBase.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataProviderNotifierBase.as
index 853fbb9..6c7eb08 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataProviderNotifierBase.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataProviderNotifierBase.as
@@ -16,7 +16,7 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads
+package org.apache.flex.html.supportClasses
 {
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadModel;
@@ -29,15 +29,14 @@ package org.apache.flex.html.beads
 	import org.apache.flex.collections.ArrayList;
 	
 	/**
-	 *  The DataProviderChangeNotifier notifies listeners when a selection model's
-	 *  ArrayList dataProvider has changed.
+	 *  Base class for all data provider notifiers.
 	 *  
 	 *  @langversion 3.0
 	 *  @playerversion Flash 10.2
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class DataProviderChangeNotifier implements IBead, IDocument
+	public class DataProviderNotifierBase implements IBead, IDocument
 	{
 		/**
 		 *  constructor.
@@ -47,13 +46,13 @@ package org.apache.flex.html.beads
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public function DataProviderChangeNotifier()
+		public function DataProviderNotifierBase()
 		{
 		}
 		
-		protected var _dataProvider:ArrayList;
+		protected var dataProvider:ArrayList;
 		
-		private var _strand:IStrand;
+		protected var _strand:IStrand;
 		
 		/**
 		 *  @copy org.apache.flex.core.IBead#strand
@@ -76,23 +75,9 @@ package org.apache.flex.html.beads
 			}
 		}
 		
-		private function destinationChangedHandler(event:Event):void
+		protected function destinationChangedHandler(event:Event):void
 		{
-			if (_dataProvider == null) {
-				var object:Object = document[sourceID];
-				_dataProvider = object[propertyName] as ArrayList;
-			}
-			else {
-				_dataProvider.removeEventListener("itemAdded", handleDataProviderChanges);
-				_dataProvider.removeEventListener("itemRemoved", handleDataProviderChanges);
-				_dataProvider.removeEventListener("itemUpdated", handleDataProviderChanges);
-                _dataProvider.removeEventListener("collectionChanged", handleDataProviderChanges);
-			}
-			
-			_dataProvider.addEventListener("itemAdded", handleDataProviderChanges);
-			_dataProvider.addEventListener("itemRemoved", handleDataProviderChanges);
-			_dataProvider.addEventListener("itemUpdated", handleDataProviderChanges);
-			_dataProvider.addEventListener("collectionChanged", handleDataProviderChanges);
+
 		}
 		
 		protected var document:Object;
@@ -165,11 +150,5 @@ package org.apache.flex.html.beads
 		{
 			_propertyName = value;
 		}
-
-		private function handleDataProviderChanges(event:Event):void
-		{
-            var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as
ISelectionModel;
-            selectionModel.dispatchEvent(new Event("dataProviderChanged"));
-		}
 	}
 }


Mime
View raw message