flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [3/4] git commit: [flex-sdk] [refs/heads/develop] - Revert "Fixed issue (RTEs) with editable data grid when it has an array of simple values (Number, String etc)"
Date Thu, 15 Aug 2013 13:42:33 GMT
Revert "Fixed issue (RTEs) with editable data grid when it has an array of simple values (Number,
String etc)"

This reverts commit 56c55d0f3e6d77f38823a1204321d09c6017f9e2.


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

Branch: refs/heads/develop
Commit: 47a0f17c48b9751dd01790093b3b9ed02a07ed6f
Parents: 0e1cbf1
Author: Justin Mclean <jmclean@apache.org>
Authored: Thu Aug 15 07:52:14 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Thu Aug 15 07:52:14 2013 +1000

----------------------------------------------------------------------
 .../src/mx/controls/AdvancedDataGridBaseEx.as   | 59 +++++++-------------
 1 file changed, 20 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/47a0f17c/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
index 627ca9a..9c3a3f4 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
@@ -3397,7 +3397,7 @@ public class AdvancedDataGridBaseEx extends AdvancedDataGridBase implements
IIME
                     ObjectUtil.getClassInfo(iterator.current,
                                             ["uid", "mx_internal_uid"]);
 
-                if (info)
+                if(info)
                     cols = info.properties;
             }
 
@@ -3420,21 +3420,15 @@ public class AdvancedDataGridBaseEx extends AdvancedDataGridBase implements
IIME
                 // this is an old recordset - use its columns
                 var n:int = cols.length;
                 var colName:Object;
-				if  (n == 0) {
-					col = new AdvancedDataGridColumn();
-					newCols.push(col);
-				}
-				else {
-	                for (var i:int = 0; i < n; i++)
-	                {
-	                    colName = cols[i];
-	                    if (colName is QName)
-	                        colName = QName(colName).localName;
-	                    col = new AdvancedDataGridColumn();
-	                    col.dataField = String(colName);
-	                    newCols.push(col);
-	                }
-				}
+                for (var i:int = 0; i < n; i++)
+                {
+                    colName = cols[i];
+                    if (colName is QName)
+                        colName = QName(colName).localName;
+                    col = new AdvancedDataGridColumn();
+                    col.dataField = String(colName);
+                    newCols.push(col);
+                }
             }
             columns = newCols;
             generatedColumns = true;
@@ -4023,7 +4017,7 @@ public class AdvancedDataGridBaseEx extends AdvancedDataGridBase implements
IIME
         var g:Graphics = background.graphics;
         g.clear();
 
-        if (columnIndex >= lockedColumnCount && 
+        if(columnIndex >= lockedColumnCount && 
            columnIndex < lockedColumnCount + horizontalScrollPosition)
             return;
 
@@ -4041,9 +4035,8 @@ public class AdvancedDataGridBaseEx extends AdvancedDataGridBase implements
IIME
 
         // Height is usually as tall is the items in the row, but not if
         // it would extend below the bottom of listContent
-		var height:Number = 0;
-		if (lastRow)
-        	height = Math.min(lastRow.y + lastRow.height, listContent.height - yy);
+        var height:Number = Math.min(lastRow.y + lastRow.height,
+                                     listContent.height - yy);
 
         g.drawRect(xx, yy, headerInfo.headerItem.width, height);
         g.endFill();
@@ -8009,8 +8002,8 @@ public class AdvancedDataGridBaseEx extends AdvancedDataGridBase implements
IIME
                 var newData:Object = itemEditorInstance[_columns[event.columnIndex].editorDataField];
                 var property:String = _columns[event.columnIndex].dataField;
                 var data:Object = event.itemRenderer.data;
-                var typeInfo:String = describeType(data).@name;
-                for each (var variable:XML in describeType(data).variable)
+                var typeInfo:String = "";
+                for each(var variable:XML in describeType(data).variable)
                 {
                     if (property == variable.@name.toString())
                     {
@@ -8039,23 +8032,11 @@ public class AdvancedDataGridBaseEx extends AdvancedDataGridBase implements
IIME
                     if (!(newData is int))
                         newData = Number(newData);
                 }
-				if (property == null)
-				{
-					if (data != newData)
-					{
-						bChanged = true;
-						data = newData;
-					}	
-				}
-				else
-				{
-					if (data[property] != newData)
-					{
-						bChanged = true;
-						data[property] = newData;
-					}					
-				}
-
+                if (data[property] != newData)
+                {
+                    bChanged = true;
+                    data[property] = newData;
+                }
                 if (bChanged && !(data is IPropertyChangeNotifier))
                 {
                     collection.itemUpdated(data, property);


Mime
View raw message