[ https://issues.apache.org/jira/browse/FLEX-15159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14537043#comment-14537043 ]
Alex Harui commented on FLEX-15159: ----------------------------------- If your patch can work for both that would be great. I don't remember the reason for the new one. Feel free to ask on d...@flex.apache.org. More folks are listening there than to JIRA activity. > For each loop is unable to iterate through ArrayList > ---------------------------------------------------- > > Key: FLEX-15159 > URL: https://issues.apache.org/jira/browse/FLEX-15159 > Project: Apache Flex > Issue Type: Bug > Components: Collections > Affects Versions: Adobe Flex SDK 3.0 (Release) > Environment: Affected OS(s): Windows > Affected OS(s): Windows XP > Language Found: English > Reporter: Adobe JIRA > > 1. Make sure your imports are correct: > import mx.controls.Alert; > import mx.collections.IList; > import mx.collections.ArrayList; > 2. Create a function which looks like: > private function foo() : void > { > var aList : IList = new ArrayList(); > aList.addItem("foo"); > > for each (var s : String in aList) > { > Alert.show(s); > } > } > 3. Call the function > > Actual Results: No message box is shown > > > Expected Results: A message box with the text "foo" > > This becomes a problem when you don't know what implementation an IList > variable will be bound to, ref: http://bugs.adobe.com/jira/browse/SDK-14837 > Workaround (if any): use the for loop instead > for (var i : int = 0; i < aList.length; i++) -- This message was sent by Atlassian JIRA (v6.3.4#6332)