flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1297704 - /incubator/flex/whiteboard/tink/navigators/src/ws/tink/spark/controls/DataNavigator.as
Date Tue, 06 Mar 2012 20:44:26 GMT
Author: tink
Date: Tue Mar  6 20:44:25 2012
New Revision: 1297704

URL: http://svn.apache.org/viewvc?rev=1297704&view=rev
Log:
Fixed bug with missing event listeners on the contentGroup spark.events.IndexChangeEvent.CHANGE
and mx.events.FlexEvent.VALUE_COMMIT (https://github.com/robmcm/Tink-Flex-4.1/commit/1d1466831f2cf3c8d6ffda4837cadfb586b910b9#diff-0)

Modified:
    incubator/flex/whiteboard/tink/navigators/src/ws/tink/spark/controls/DataNavigator.as

Modified: incubator/flex/whiteboard/tink/navigators/src/ws/tink/spark/controls/DataNavigator.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/tink/navigators/src/ws/tink/spark/controls/DataNavigator.as?rev=1297704&r1=1297703&r2=1297704&view=diff
==============================================================================
--- incubator/flex/whiteboard/tink/navigators/src/ws/tink/spark/controls/DataNavigator.as
(original)
+++ incubator/flex/whiteboard/tink/navigators/src/ws/tink/spark/controls/DataNavigator.as
Tue Mar  6 20:44:25 2012
@@ -1250,6 +1250,18 @@ package ws.tink.spark.controls
 					contentGroup.addEventListener(
 						RendererExistenceEvent.RENDERER_REMOVE, dispatchEvent);
 				}
+				
+				if (hasEventListener(FlexEvent.VALUE_COMMIT))
+				{
+					contentGroup.addEventListener(
+						FlexEvent.VALUE_COMMIT, dispatchEvent);
+				}
+				
+				if (hasEventListener(IndexChangeEvent.CHANGE))
+				{
+					contentGroup.addEventListener(
+						IndexChangeEvent.CHANGE, dispatchEvent);
+				}
 			}
 		}
 		
@@ -1266,6 +1278,10 @@ package ws.tink.spark.controls
 					RendererExistenceEvent.RENDERER_ADD, dispatchEvent);
 				contentGroup.removeEventListener(
 					RendererExistenceEvent.RENDERER_REMOVE, dispatchEvent);
+				contentGroup.removeEventListener(
+					FlexEvent.VALUE_COMMIT, dispatchEvent);
+				contentGroup.removeEventListener(
+					IndexChangeEvent.CHANGE, dispatchEvent);
 				
 				// copy proxied values from contentGroup (if explicitly set) to dataGroupProperties
 				
@@ -1376,6 +1392,18 @@ package ws.tink.spark.controls
 				contentGroup.addEventListener(
 					RendererExistenceEvent.RENDERER_REMOVE, dispatchEvent);
 			}
+			
+			if (type == FlexEvent.VALUE_COMMIT && contentGroup)
+			{
+				contentGroup.addEventListener(
+					FlexEvent.VALUE_COMMIT, dispatchEvent);
+			}
+			
+			if (type == IndexChangeEvent.CHANGE && contentGroup)
+			{
+				contentGroup.addEventListener(
+					IndexChangeEvent.CHANGE, dispatchEvent);
+			}
 		}
 		
 		/**
@@ -1408,6 +1436,24 @@ package ws.tink.spark.controls
 						RendererExistenceEvent.RENDERER_REMOVE, dispatchEvent);
 				}
 			}
+			
+			if (type == FlexEvent.VALUE_COMMIT && contentGroup)
+			{
+				if (!hasEventListener(FlexEvent.VALUE_COMMIT))
+				{
+					contentGroup.removeEventListener(
+						FlexEvent.VALUE_COMMIT, dispatchEvent);
+				}
+			}
+			
+			if (type == IndexChangeEvent.CHANGE && contentGroup)
+			{
+				if (!hasEventListener(IndexChangeEvent.CHANGE))
+				{
+					contentGroup.removeEventListener(
+						IndexChangeEvent.CHANGE, dispatchEvent);
+				}
+			}
 		}
 		
 		



Mime
View raw message