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

HierarchicalCollectionViewCursor.findAny() function only finds the searched element if it is in position 1

    XMLWordPrintableJSON

Details

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

    Description

      Steps to reproduce:
      1. Create a HierarchicalCollectionView hcv
      2. Create a cursor with hcv.createCursor()
      3. Search for an element that is not in the first position of the collection

      Actual Results:
      Element is not found

      Expected Results:
      Element should be found

      Workaround (if any):
      I think the problem is located at line 422 of HierarchicalCollectionView, in function findAny():
      done = moveNext();
      where the cursor goes to the next element of the collection, after comparing the previous one to the one we are looking for.
      In my head, it should not be "done" if the cursor successfully moved to the next element; it should be "done" only if there are no more elements to compare with in the collection.
      Therefore, I think that a possible workaround would be:
      done = ! moveNext();

      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: