You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2017/08/30 20:37:33 UTC
[21/32] flex-asjs git commit: “Stringables” should be assignable to XML
“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/feature/dragAndDrop
Commit: 3bb0e7b1205315edb379be3674e6a2be05165cee
Parents: e17b287
Author: Harbs <ha...@in-tools.com>
Authored: Wed Aug 23 23:51:24 2017 +0300
Committer: Harbs <ha...@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)
{