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

ListCollectionView getItemIndex() throws RTE when sorting objects without compare function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • Collections
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Create a ListCollectionView with Objects that have object-typed properties.
      For example:
      <s:ArrayCollection id="dp1">
      <fx:Object id="obj1">
      <fx:address>
      <fx:Object town='waltham' state='MA' zipCode='02452'/>
      </fx:address>
      </fx:Object>
      <fx:Object id="obj2">
      <fx:address>
      <fx:Object town='wilmington' state='MA' zipCode='01887'/>
      </fx:address>
      </fx:Object>
      </s:ArrayCollection>

      2. Sort the ListCollectionView using the object-typed property (ex. "address"), but without a compareFunction.
      3. Try to use getItemIndex() on the LCV.

      See attached file for example. Steps are:
      1. click "sort collection".
      2. click "getItemIndex from sorted ArrayCollection".

      Actual Results:
      Throws SortError

      Expected Results:
      No Error

      Workaround (if any):
      Use a compareFunction, or remove the sort before using getItemIndex().

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: