flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [2/3] git commit: [flex-sdk] [refs/heads/develop] - made code constant in both classes
Date Fri, 03 Jan 2014 06:51:35 GMT
made code constant in both classes


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

Branch: refs/heads/develop
Commit: e3ade5a5eed6782591a740292a01bcf74b78a3f4
Parents: 229c5de
Author: Justin Mclean <jmclean@apache.org>
Authored: Fri Jan 3 17:42:53 2014 +1100
Committer: Justin Mclean <jmclean@apache.org>
Committed: Fri Jan 3 17:42:53 2014 +1100

----------------------------------------------------------------------
 .../AdvancedDataGridColumn.as                   | 35 +++++++++++---------
 .../AdvancedDataGridColumnGroup.as              |  2 ++
 2 files changed, 22 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e3ade5a5/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
index dbebdff..2cf14b5 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
@@ -1778,10 +1778,13 @@ public class AdvancedDataGridColumn extends CSSStyleDeclaration implements
IIMES
 
         if (typeof(data) == "object" || typeof(data) == "xml")
         {
-            if (dataField in data)
-                data = data[dataField];
-			else
-				data = null;
+			if (dataField != null)
+			{
+	            if (dataField in data)
+	                data = data[dataField];
+				else
+					data = null;
+			}
         }
 
         if (data is String)
@@ -1834,17 +1837,19 @@ public class AdvancedDataGridColumn extends CSSStyleDeclaration implements
IIMES
             var field:String = dataTipField;
             if (!field)
                 field = owner.dataTipField;
-			data = null;
-			try
-            {
-                if (data[field] != null)
-                    data = data[field];
-                else if (data[dataField] != null)
-                    data = data[dataField];
-            }
-            catch(e:Error)
-            {
-            }                
+
+            if (field != null)
+			{
+				if (field in data && data[field] != null)
+					data = data[field];
+			}
+            else if (dataField != null)
+			{
+				if (dataField in data && data[dataField] != null)
+	                data = data[dataField];
+				else
+					data = null;  
+			}
         }
 
         if (data is String)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e3ade5a5/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumnGroup.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumnGroup.as
b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumnGroup.as
index 88e9e80..98efd76 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumnGroup.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumnGroup.as
@@ -265,10 +265,12 @@ public class AdvancedDataGridColumnGroup extends AdvancedDataGridColumn
        if (typeof(data) == "object" || typeof(data) == "xml")
        {
             if (dataField != null)
+			{
 				if (dataField in data)
                 	data = data[dataField];
 				else
 					data = null;
+			}
        }
        return data;
     }


Mime
View raw message