flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Added setAttribute() and setChild() to XMLList
Date Tue, 12 Apr 2016 21:26:09 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 70a4892d6 -> 9ce42e25f


Added setAttribute() and setChild() to XMLList


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

Branch: refs/heads/develop
Commit: 9ce42e25f38809d52c6c26691056983e36d5b447
Parents: 70a4892
Author: Harbs <harbs@in-tools.com>
Authored: Wed Apr 13 00:26:02 2016 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Wed Apr 13 00:26:02 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XMLList.as | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9ce42e25/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 1173512..8284bda 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -651,6 +651,24 @@ package
 			return _targetProperty;
 		}
 		
+		COMPILE::JS
+		public function setAttribute(attr:*,value:String):void
+		{
+			var len:int = _xmlArray.length;
+			for (var i:int=0;i<len;i++)
+				_xmlArray[i].setAttribute(attr,value);
+
+		}
+
+
+		COMPILE::JS
+		public function setChild(elementName:*, elements:Object):void
+		{
+			var len:int = _xmlArray.length;
+			if(len == 0)
+				_xmlArray[0].setChild(elementName,elements);
+
+		}
 		/**
 		 * Calls the text() method of each XML object and returns an XMLList object that contains
the results.
 		 * 


Mime
View raw message