Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33683

Bad ordering of ListCollectionView addAllAt

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Apache Flex 4.10.0
    • Apache Flex 4.11.0
    • Collections
    • None
    • Flex 4.10 (compiled for AIR 3.4, Flash Player 11.4

    Description

      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;

      Attachments

        1. AddAllOrder.mxml
          1 kB
          Marcus Wilkinson

        Activity

          People

            Unassigned Unassigned
            marcus_sparkus Marcus Wilkinson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: