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/08/11 13:20:13 UTC

git commit: [flex-sdk] [refs/heads/develop] - Fixed issue with data grid using an array of strings creating a column called length

Updated Branches:
  refs/heads/develop 22b68dedd -> c6b5dc7a4


Fixed issue with data grid using an array of strings creating a column called length


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

Branch: refs/heads/develop
Commit: c6b5dc7a44a9f1b9d650023cd1774305de0b3bd7
Parents: 22b68de
Author: Justin Mclean <jm...@apache.org>
Authored: Sun Aug 11 21:19:56 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Sun Aug 11 21:19:56 2013 +1000

----------------------------------------------------------------------
 frameworks/projects/mx/src/mx/controls/DataGrid.as | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/c6b5dc7a/frameworks/projects/mx/src/mx/controls/DataGrid.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mx/src/mx/controls/DataGrid.as b/frameworks/projects/mx/src/mx/controls/DataGrid.as
index 30f20e7..087ef90 100644
--- a/frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ b/frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -2770,9 +2770,13 @@ public class DataGrid extends DataGridBase implements IIMESupport
                     iteratorValid = false;
                     return;
                 }
+				
+				var excludes:Array = ["uid", "mx_internal_uid"];
+				if (iterator && iterator.current is String)
+					excludes.push("length");
+				
                 var info:Object =
-                    ObjectUtil.getClassInfo(iterator.current,
-                                            ["uid", "mx_internal_uid"]);
+                    ObjectUtil.getClassInfo(iterator.current, excludes);
 
                 if (info)
                     cols = info.properties;
@@ -2797,7 +2801,7 @@ public class DataGrid extends DataGridBase implements IIMESupport
                 // this is an old recordset - use its columns
                 var n:int = cols.length;
                 var colName:Object;
-				if (n == 0) {
+				if (n == 0 && iterator.current) {
 					col = new DataGridColumn();
 					newCols.push(col);
 				}