flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [24/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Fixed XML bugs
Date Thu, 25 Aug 2016 15:32:32 GMT
Fixed XML bugs


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

Branch: refs/heads/spark
Commit: 5121d5cf1327c9e00d83870768a50435c0874335
Parents: 3dea25a
Author: Harbs <harbs@in-tools.com>
Authored: Thu Aug 4 23:15:14 2016 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Thu Aug 4 23:15:14 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as     |  2 +-
 frameworks/projects/XML/src/main/flex/XMLList.as | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5121d5cf/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 9c45b5c..c629c8b 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -787,7 +787,7 @@ package
 					if(name.matches(_children[i].name()))
 						list.appendChild(_children[i]);
 
-					list.concat(_children[i].descendants());
+					list.concat(_children[i].descendants(name));
 				} 
 			}
 			return list;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5121d5cf/frameworks/projects/XML/src/main/flex/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
index 18e4917..59982b0 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -201,6 +201,17 @@ package
 		public function child(propertyName:Object):XMLList
 		{
 			var retVal:XMLList = new XMLList();
+			var propNum:Number = parseInt(propertyName,10);
+			if(propNum.toString() == propertyName)
+			{
+				if(propNum >= 0 && propNum < _xmlArray.length)
+				{
+					retVal.appendChild(_xmlArray[propNum]);
+					retVal.targetObject = _xmlArray[propNum];
+				}
+				return retVal;
+			}
+
 			var len:int = _xmlArray.length;
 			for (var i:int=0;i<len;i++)
 			{


Mime
View raw message