yishayw opened a new issue, #1203:
URL: https://github.com/apache/royale-asjs/issues/1203

   In this app
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
                   applicationComplete="init()"
                   width="100%"
                   height="100%"
                   xmlns:s="library://ns.apache.org/royale/spark"
                   xmlns:mx="library://ns.apache.org/royale/mx">
                   
        <fx:Script>
           <![CDATA[
               import mx.managers.PopUpManager;
               private function init():void
               {
                   var arr:Array = [<node label="b"/>, <node label="a"/>];
                   arr.sortOn(["@label"]);
                   trace(((arr[0] as XML).@label).toString());
               }
           ]]>
       </fx:Script>
   </mx:Application>
   
   ```
   
   I would expect the trace output to be 'a' (as it is in Flex), but instead it 
is 'b'.
   
   Apparently flash player knows how to parse XML and can sort an array of XML 
objects, but Language.as does assumes the objects are simple and does not read 
`@label` correctly.
   
   As, in Royale, XML is a separate library the question is whether Language.as 
where this sortOn function is location, is, or even should be, made aware of 
XML objects.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to