Array - sortOn fails for XML data
- Dominant language
- ActionScript
- Stars
- 380
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
In this app
```
, ];
arr.sortOn(["@label"]);
trace(((arr[0] as XML).@label).toString());
}
]]>
```
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading Language.as's sortOn implementation and the Royale XML library, then compare how @label is exposed for XML objects. Confirm the expected behavior using the provided example and determine whether support belongs in sortOn or the XML library; done means a decided scope with the behavior verified or documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100