flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject flex-asjs git commit: “Stringables” should be assignable to XML
Date Wed, 23 Aug 2017 20:51:28 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop e17b287c1 -> 3bb0e7b12


“Stringables” should be assignable to XML


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

Branch: refs/heads/develop
Commit: 3bb0e7b1205315edb379be3674e6a2be05165cee
Parents: e17b287
Author: Harbs <harbs@in-tools.com>
Authored: Wed Aug 23 23:51:24 2017 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Wed Aug 23 23:51:24 2017 +0300

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3bb0e7b1/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 7970df1..054682e 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -1943,6 +1943,15 @@ package
 			var i:int;
 			var len:int;
 			var chld:XML;
+
+			// I'm not wure that this a strict interpretation of the spec but I think this does the
"right thing".
+			var childType:String = typeof elements;
+			if(childType != "object")
+			{
+				var stringable:XML = xmlFromStringable(elements);
+				elements = new XML("<" + elementName + "/>");
+				elements.appendChild(stringable);
+			}
 			
 			if(elements is XML)
 			{


Mime
View raw message