I don’t have the bandwidth right now to find another solution, so I will not oppose Edwards solution.
However, it’s going to require changes to getLabelFromData. That has since been modified to support aggressive minification. This discussion should probably continue on Github. > On Jun 14, 2022, at 12:17 AM, Greg Dove <greg.d...@gmail.com> wrote: > > I personally don't think that this should be anything that the user has to > make an conscious effort to enable (like choosing beads, which is our main > tangible expression of PAYG / 'code as you go'). The reason I think this is > simply because it is api emulation of native as3 language-level types as > opposed to 'framework' classes (XML and Lanuage are only in our 'framework' > to support native as3 emulation, and should not be 'beady' IMO). > > However if people are not using XML in their code anywhere, and it is not > present in the codebase, then there should of course be very little > overhead for supporting it, because it won't be needed in the app. > Language.as currently should be 'export' suppressed, so that if the array > sorton code is never used it should be dead-code-eliminated as well, for > example. > > So the thing in my mind that makes sense is if the first use of XML > anywhere runs static code that 'installs' a 'getValue' plugin into Language > that covers XML and XMLlist cases for the Array sortOn support (and perhaps > for other uses, if it was helpful to use it elsewhere). > This general approach should work I think because XML already has a static > dependency on Language.as, but it might need a bit of compiler tweaking as > well. I have been meaning to look more at supporting static initialization > blocks in general, which will no doubt be a bit trickier than I'd like. I > am happy to look into it, but it likely won't be something I can do in the > next couple of weeks. Probably in the short term, a Language.as monkeypatch > could suffice, Yishay. perhaps using whatever solution Edward has already > proposed. > > My 2 cents > Greg > > > > On Tue, Jun 14, 2022 at 2:21 AM Harbs <harbs.li...@gmail.com> wrote: > >> Edward did some work to fix that which I objected to on PAYG grounds. >> https://github.com/apache/royale-asjs/pull/1150 < >> https://github.com/apache/royale-asjs/pull/1150> >> >> I was supposed to make an alternate suggestion, but forgot to follow up. >> >>> On Jun 13, 2022, at 1:55 PM, Yishay Weiss <yishayj...@hotmail.com> >> wrote: >>> >>> Hi All, >>> >>> Array.sortOn() is failing for me for XML objects. I think the reason is >> that Language.as is not aware of XML objects. I have opened an issue with a >> test case [1]. Any ideas on how to resolve this? >>> >>> Thanks, >>> Yishay >>> >>> [1] Array - sortOn fails for XML data · Issue #1203 · apache/royale-asjs >> (github.com)<https://github.com/apache/royale-asjs/issues/1203> >>> >>> >>> >> >>