[ 
https://issues.apache.org/jira/browse/FLEX-35070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15235693#comment-15235693
 ] 

Harbs edited comment on FLEX-35070 at 4/11/16 6:40 PM:
-------------------------------------------------------

Yes. It's generating "for in". What I'm saying is that "for in" is not a good 
way to iterate over an array. (not XMLList).

I'm suggesting something like this:
for each(bla in foo){
//
}
would become:
var foreachiter0 = 0;
var foreachlen0 = typeof foo.length == "function" ? foo.length() : foo.length;
while(foreachiter0 < foreachlen0){
bla = foo[foreachiter0++];
//
}


was (Author: harbs):
Yes. It's generating "for in". What I'm saying is that "for in" is not a good 
way to iterate over an array. (not XMLList).

I'm suggesting something like this:
for each(bla in foo){
//
}
would become:
var foreachiter0 = 0;
var foreachlen0 = typeof foo.length == "function" ? foo.length() : foo.length;
while(foreachiter0 < len){
bla = foo[foreachiter0++];
//
}

> "for each" not working in XMLList
> ---------------------------------
>
>                 Key: FLEX-35070
>                 URL: https://issues.apache.org/jira/browse/FLEX-35070
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: FalconJX
>    Affects Versions: Apache FalconJX 0.6.0
>            Reporter: Harbs
>
> I don't have a full test case right now, but I believe the following will 
> fail.
> var newList:XMLList = new XMLList();
> newList.appendChild(<foo/>);
> var xmlItem:XML;
> for each(xmlItem in oldList)
>   newList.appendChild(xmlItem);
> If necessary, I can put together a (non)working test case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to