[
https://issues.apache.org/jira/browse/FLEX-15159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547141#comment-14547141
]
ASF GitHub Bot commented on FLEX-15159:
---------------------------------------
GitHub user Dretch opened a pull request:
https://github.com/apache/flex-sdk/pull/18
Fix FLEX-15159 by making ArrayList extend Proxy.
This fixes https://issues.apache.org/jira/browse/FLEX-15159.
Notes:
- This is more-or-less a copy-paste job with code taken from
`ListCollectionView`
- I have patched both `mx.collections.ArrayList` and also
`org.apache.flex.collections.ArrayList`
- I have written a unit test for the changes and put it in what seems to be
a logical place. The test passes, but can't figure out how to get the build to
call it. I was having segfault problems with my flashplayer that made it
difficult to look into this further. It is possible (and I hope it is the case)
that something in the build will call this test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Dretch/flex-sdk flex-15159
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flex-sdk/pull/18.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #18
----
commit 9b483a586bd29867aece66eebd16c3acefe49732
Author: Dretch <[email protected]>
Date: 2015-05-17T11:44:20Z
Fix FLEX-15159 by making ArrayList extend Proxy.
----
> 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)