joshtynjala commented on issue #203:
URL: https://github.com/apache/royale-compiler/issues/203#issuecomment-996021813


   > What defines XML as "dynamic"?
   
   When I think of something being dynamic in AS3, I think of accessing 
arbitrary properties that are not known by the compiler. With `XML` and 
`XMLList` in AS3, you you can do stuff like this: 
`xml.someRandomName.anythingYouWant`. The names `someRandomName` and 
`anythingYouWant` are not known by the compiler. You are allowed to use any 
name you want, a lot like the `Object` or `*` types.
   
   > So while that will work, there's lots of extra calls to Language.string. 
It would be better if we can avoid that.
   
   Have you tried using the `-strict-xml=true` compiler option? The default 
behavior matches the classic Flex SDK compiler (there's a comment in the Royale 
compiler that says that Adobe did this on purpose), but I think that Alex added 
this new option to allow someone to opt into stricter XML typing. The 
description notes that you might get extra warnings, though. I haven't 
personally tried it, except as a quick experiment to see if `toXMLString()` 
would resolve (and it did). This option may be worth trying to see if you can 
get the behavior that you personally are looking for.


-- 
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-unsubscr...@royale.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to