You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/05/29 04:24:03 UTC

[5/5] git commit: [flex-sdk] [refs/heads/develop] - FLEX-32846 (and probably others) While FP may be fixed it's bad form to delete items from a list while iterating over it.

FLEX-32846 (and probably others) While FP may be fixed it's bad form to delete items from a list while iterating over it.


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

Branch: refs/heads/develop
Commit: b38f1419b9fb4a9a4e3e65d81f3b1a29f27927c4
Parents: 37ce2ef
Author: Justin Mclean <jm...@apache.org>
Authored: Wed May 29 12:15:44 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed May 29 12:15:44 2013 +1000

----------------------------------------------------------------------
 .../src/mx/controls/AdvancedDataGrid.as            |   36 ++++++++-------
 1 files changed, 20 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/b38f1419/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
index a474918..d92a5e7 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
@@ -3952,15 +3952,14 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
     {
         if (isCellSelectionMode())
         {
-            for (var p:String in cellSelectionIndicators[uid])
-            {
-                removeCellIndicators(uid, int(p));
-            }
-
-            for (p in visibleCellRenderers[uid])
-            {
-                delete visibleCellRenderers[uid][p];
-            }
+			var keys:Array = [];
+			for (var p:String in cellSelectionIndicators[uid]) {
+				keys.push(p);	
+			}
+			
+			for each (p in keys) {
+				removeCellIndicators(uid, int(p));
+			}
 
             delete visibleCellRenderers[uid];
         }
@@ -7973,13 +7972,18 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
      */
     protected function clearCellIndicators():void
     {
-        for (var p:String in cellSelectionIndicators)
-        {
-            for (var q:String in cellSelectionIndicators[p])
-            {
-                removeCellIndicators(p, int(q));
-            }
-        }
+		for (var p:String in cellSelectionIndicators)
+		{
+			var keys:Array = [];
+			for (var q:String in cellSelectionIndicators[p]) {
+				keys.push(q);	
+			}
+			
+			for each (q in keys)
+			{
+				removeCellIndicators(p, int(q));
+			}
+		}
 
         cellSelectionTweens     = {};
         cellSelectionIndicators = {};