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

Unexpected behaviour of ListCollectionView.itemUpdated() when only one parameter supplied

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Apache Flex 4.15.0
    • Fix Version/s: Apache Flex 4.16.0
    • Component/s: Collections
    • Labels:
      None

      Description

      See the unit tests in mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as which are tagged (in a comment, above the function) with FLEX-35043.

      FLEX-34885 invalidated two previous assumptions:

      1. When calling itemUpdated(item) on a collection with only the first parameter provided (which developers usually do to signal that some - unspecified - properties of the item have changed), ListCollectionView.handlePropertyChangeEvents() would treat that as if the object has been just introduced to the collection, replacing a null value - since oldValue was null, and property was also null. (When the "property" value of the PropertyChangeEvent was null, it was taken to mean that the oldValue - which was also null - was changed into that item, i.e. the object reference changed in the collection, not just one of the object's properties.) As such, it would try to remove that supposedly existing null value from the collection (and sometimes a null does exist, but shouldn't be removed).
      2. The assumptions in SF_ORIG_list_events_tester.List_events_collectionKind_move (which started failing) show that calling itemUpdated(item) does not reposition the item according to the sorting rules anymore (unless the Sort has a customCompareFunction).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                evolverine Mihai Chira
                Reporter:
                evolverine Mihai Chira
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: