You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Colin Childs (JIRA)" <ji...@apache.org> on 2013/09/17 17:16:52 UTC

[jira] [Commented] (FLEX-33738) ArrayCollection addAll() adds items in the wrong order

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

Colin Childs commented on FLEX-33738:
-------------------------------------

in addAllAt() should

var maxLength:int = length

actually read

var maxLength:int = this.length; ?
                
> ArrayCollection addAll() adds items in the wrong order
> ------------------------------------------------------
>
>                 Key: FLEX-33738
>                 URL: https://issues.apache.org/jira/browse/FLEX-33738
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Collections
>    Affects Versions: Apache Flex 4.10.0
>            Reporter: Colin Childs
>
> ArrayCollection's addAll() method has incorrect behavior. Take the following code for example:
> var test:ArrayCollection = new ArrayCollection();
> test.addAll(new ArrayCollection([1,2,3]));
> test.addAll(new ArrayCollection([4,5,6]));
> test.addAll(new ArrayCollection([7,8,9]));
> trace(test);
> In 4.6, this behaves as expected, and according to documentation, returning "1,2,3,4,5,6,7,8,9". In 4.10.0, it appears as though any calls to addAll() add the new items to the end of the original list, instead of the entire list, so you get the incorrect result "1,2,3,7,8,9,4,5,6".

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira