You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2022/06/13 10:53:20 UTC
[GitHub] [royale-asjs] yishayw opened a new issue, #1203: Array - sortOn fails for XML data
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: issues-unsubscribe@royale.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [royale-asjs] estanglerbm commented on issue #1203: Array - sortOn fails for XML data
Posted by GitBox <gi...@apache.org>.
estanglerbm commented on issue #1203:
URL: https://github.com/apache/royale-asjs/issues/1203#issuecomment-1154497346
https://github.com/apache/royale-asjs/pull/1150
--
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: issues-unsubscribe@royale.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org