@Harbs, that would be nice for this particular use case. Until then, I will use this monkey patch. May not be the best solution but works for me.
@Eduard, it's for mxml. @Alex, I thought that. I have many, many beads on my side that personalize the behaviours just as I want with things very specific that should not be put on the SDK. Beads are a perfect and elegant solution to modify the SDK behaviour but I don't know how to use them on this scenario. For now I will use this monkey patch until we have a better solution to replace. Alex Harui <aha...@adobe.com.invalid> escreveu no dia terça, 7/06/2022 à(s) 23:21: > You could probably come up with an app-level bead that overwrites a > utility function. > > But it might be more interesting to explore providing an example of using > ES5 Template Literals > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals > in an item renderer. > > getLabelFromData is called by a dataToString, so dataToString could be > overridden to return such a string literal. IMO, that would perform better > since the browser JS engine would do the string substitution. Yes, it > means custom item renderers, instead of interpreting labelField, but it > would show that Royale can use new cool ES5 optimizations. Might require a > compiler change, not sure. > > And it wouldn't have backward compatibility implications or monkey-patch > the SDK. > > Just a thought, > -Alex > > On 6/7/22, 2:56 PM, "Harbs" <harbs.li...@gmail.com> wrote: > > EXTERNAL: Use caution when clicking on links or opening attachments. > > > I’d love to come up a pattern for hot-swapping utility functions, but > we don’t have one yet... > > > On Jun 8, 2022, at 12:38 AM, Hugo Ferreira <hferreira...@gmail.com> > wrote: > > > > Yes, I know that. > > But seems a bazooka for a simple thing. > > >