Return-Path: X-Original-To: apmail-flex-issues-archive@minotaur.apache.org Delivered-To: apmail-flex-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D0C8618795 for ; Thu, 31 Mar 2016 13:07:25 +0000 (UTC) Received: (qmail 91408 invoked by uid 500); 31 Mar 2016 13:07:25 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 91381 invoked by uid 500); 31 Mar 2016 13:07:25 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 91371 invoked by uid 99); 31 Mar 2016 13:07:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Mar 2016 13:07:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 737FC2C1F5A for ; Thu, 31 Mar 2016 13:07:25 +0000 (UTC) Date: Thu, 31 Mar 2016 13:07:25 +0000 (UTC) From: "Mihai Chira (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-35043) Unexpected behaviour of ListCollectionView.itemUpdated() when only one parameter supplied MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLEX-35043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mihai Chira updated FLEX-35043: ------------------------------- 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: # 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). # 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). was: See the unit tests in mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as which are tagged (in a comment, above the function) with FLEX-35043. 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). > Unexpected behaviour of ListCollectionView.itemUpdated() when only one parameter supplied > ----------------------------------------------------------------------------------------- > > Key: FLEX-35043 > URL: https://issues.apache.org/jira/browse/FLEX-35043 > Project: Apache Flex > Issue Type: Bug > Components: Collections > Affects Versions: Apache Flex 4.15.0 > Reporter: Mihai Chira > Assignee: Mihai Chira > Fix For: Apache Flex 4.16.0 > > > 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: > # 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). > # 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). -- This message was sent by Atlassian JIRA (v6.3.4#6332)