Harbs

Results 83 comments of Harbs

What defines XML as "dynamic"? FWIW, `xml[i]` (or `xmlList[i]`) can always be assumed to be XML.

> Have you tried using the -strict-xml=true compiler option? Bingo. It fixes both issues, but creates other ones: ``` var childName:String = XMLChild.name(); ``` Causes an error: `Error: Implicit coercion...

Yup. Basically there's a tradeoff here. It's good to know the details. I'll have to write this up in the docs before I forget... 😉

It looks like attributes need to be handled separately: The following: ``` if([email protected]()){ } ``` compiles to: ``` if(this.shape.rawXML.attribute('MyAttribute')["length"](){ } ```

Another one: ``` var childrenList:XMLList = range.children(); var childLen:int = childrenList.length(); for(j=0;j

For the record: `var childName:String = XMLChild.name().toString();` is a bad idea because if XMLChild is a text node, `name()` is null. A better solution is `"" + XMLChild.name()` or `String(XMLChild.name())`.

In my case `rawXML` was typed as XML. `shape` was a class. I'll check if your change fixes it later.

💣 💥 🥇 Perfect! This makes finding the legitimate cases of missing types **sooo** much easier. 🤟 You da best! 😎

This was a vast improvement. I did find some more cases of unnecessary quoting: 1. `toString` and `indexOf`: ``` if(!pg.runtimeQualifiers.(text().toString().indexOf("image_name") == 0).length()){ name = ""; } ``` compiles to: ```...

OK. Definitely better safe than sorry! 😉