Repository: flex-asjs
Updated Branches:
  refs/heads/develop f4276e0dd -> f19d96742


Returns parameter passed into setAttribute and setChild to enable chained 
assignment of values.


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

Branch: refs/heads/develop
Commit: f19d96742f05669f48d9587de6afa2d96e795cc0
Parents: f4276e0
Author: Harbs <ha...@in-tools.com>
Authored: Sun Aug 27 10:47:48 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Aug 27 10:47:48 2017 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f19d9674/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 054682e..cf3d9ea 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -1808,7 +1808,7 @@ package
                        return false;
                }
 
-               public function setAttribute(attr:*,value:String):void
+               public function setAttribute(attr:*,value:String):String
                {
                        var i:int;
                        if(!_attributes)
@@ -1823,7 +1823,7 @@ package
                                                
if(_attributes[i].name().equals(attr.name()))
                                                {
                                                        
_attributes[i].setValue(value);
-                                                       return;
+                                                       return value;
                                                }
                                                //addChild(_att)
                                        }
@@ -1831,7 +1831,7 @@ package
                                                attr.setValue(value);
                                        addChild(attr);
                                }
-                               return;
+                               return value;
 
                        }
                        if(attr.indexOf("xmlns") == 0)
@@ -1857,13 +1857,13 @@ package
                                        
if(_attributes[i].name().equals(attrXML.name()))
                                        {
                                                _attributes[i].setValue(value);
-                                               return;
+                                               return value;
                                        }
                                        //addChild(_att)
                                }
                                addChild(attrXML);
                        }
-
+                       return value;
                }
                /**
                 * Replaces the child properties of the XML object with the 
specified name with the specified XML or XMLList.
@@ -1873,7 +1873,7 @@ package
                 * @return 
                 * 
                 */
-               public function setChild(elementName:*, elements:Object):void
+               public function setChild(elementName:*, elements:Object):Object
                {
                        
                        /*
@@ -1943,6 +1943,7 @@ package
                        var i:int;
                        var len:int;
                        var chld:XML;
+                       var retVal:Object = elements;
 
                        // 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;
@@ -1996,6 +1997,7 @@ package
                        }
                        //what to do if it's not XML or XMLList? Throw an 
error? Ignore?
                        
+                       return retVal;
                }
 
                /**

Reply via email to