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

Peter Ginneberge edited comment on FLEX-33683 at 9/16/13 1:17 PM:
------------------------------------------------------------------

I consider this a bad "fix". Rather than changing the first "length" to 
this.length, change the local var to "len" which is more common (see the next 
method in that class, getItemIndex(), where len is used). Naming local 
variables the same as class properties is just asking for trouble and plain 
confusing.
Let's say you want to do a find/replace in that class and rename all "length" 
strings to something else.. good luck with that.
                
      was (Author: muzak):
    I consider this a bad "fix". Rather than changing the first "length" to 
this.lenght, change the local var to "len" which is more common (see the next 
method in that class, getItemIndex(), where len is used). Naming local 
variables the same as class properties is just asking for trouble and plain 
confusing.
                  
> Bad ordering of ListCollectionView addAllAt
> -------------------------------------------
>
>                 Key: FLEX-33683
>                 URL: https://issues.apache.org/jira/browse/FLEX-33683
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Collections
>    Affects Versions: Apache Flex 4.10.0
>         Environment: Flex 4.10 (compiled for AIR 3.4, Flash Player 11.4
>            Reporter: Marcus Wilkinson
>             Fix For: Apache Flex 4.11.0
>
>         Attachments: AddAllOrder.mxml
>
>
> Steps to reproduce:
> 1) Create an ArrayCollection (collectionA) with N elements
> 2) Create a second ArrayCollection (collectionB) with less than N elements
> 3) Call collectionA.adAll(collectionB)
> Expected result:
> All elements of collectionB are added to the *end* of collectionA
> Actual Result
> All elements of collectionB are added to collectionA at position 
> [collectionB.length]
> Suggested fix:
>  ListCollectionView.addAllAt : 664
> https://github.com/apache/flex-sdk/blob/develop/frameworks/projects/framework/src/mx/collections/ListCollectionView.as#L664
> Change
>               var maxLength:int = length
> to
>               var maxLength:int = this.length;

--
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

Reply via email to