4 ms·
Thank you - confirmed. I just dug up a copy of Flash CS6 and tried this: var val : String = "foo"; var foo : XML = <foo><bar prop={val} /></foo>; ...and
by bshimmin 10y ago
Thank you - confirmed. I just dug up a copy of Flash CS6 and tried this:
var val : String = "foo";
var foo : XML = <foo><bar prop={val} /></foo>;
...and it worked. I swear this wasn't documented anywhere. That said, I just googled a few Flex examples (I never used Flex) and it seems to be common there, so I guess that explains why at least someone knew it existed!
- jsjohnst 10y agoThat's possibly why I knew about it then (for a brief period, I did Flex work ten years ago).
- robinduckett 10y agoI used to do Flex a long time ago, and I love how the frontend dev world is finally catching up to Flash from the late naughties.
- Marazan 10y agoFlash won. The world of Internet development is slowly being remade in Flex's image. That Adobe abandoned he technology rather that retooling it to target HTML5 is a strategic blunder up there with... I can't actually work out an equivalent.
- krilnon 10y agoIt's documented. I used to be very fluent in the AS3LR, and I found it in a minute or two here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#braces_(XML) http://help.adobe.com/en_US/FlashPlatform/reference/actionsc... The formal language specification came fairly late in AS3's useful life, but it also describes the syntax: http://help.adobe.com/livedocs/specs/actionscript/3/as3_specification128.html#wp128875 http://help.adobe.com/livedocs/specs/actionscript/3/as3_spec...
- bshimmin 10y agoAh, thank you for these. I skimmed the documentation about AS3's XML support and didn't see it there, and I'm not sure "operators" would be a place I would've looked! I don't know if this would've been a super useful feature for me a decade ago, but it's nice to know it was there anyway.