Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6FF099B88 for ; Tue, 10 Apr 2012 16:19:11 +0000 (UTC) Received: (qmail 61255 invoked by uid 500); 10 Apr 2012 16:19:10 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 61224 invoked by uid 500); 10 Apr 2012 16:19:10 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 61216 invoked by uid 99); 10 Apr 2012 16:19:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 16:19:10 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.167.159.180] (HELO mail.digitalprimates.net) (66.167.159.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 16:19:04 +0000 Received: from DPSBS1.digitalprimates.local ([fe80::5823:d1b4:86c2:3ad0]) by DPSBS1.digitalprimates.local ([fe80::5823:d1b4:86c2:3ad0%22]) with mapi id 14.01.0289.001; Tue, 10 Apr 2012 11:18:44 -0500 From: "Michael A. Labriola" To: "flex-dev@incubator.apache.org" Subject: RE: ArrayList itemUpdateHandler Change Thread-Topic: ArrayList itemUpdateHandler Change Thread-Index: Ac0XJIdorBRgj3C0S3SvVKmFYVqazAACp1HfAAAYAvAAAD7EkAALdFoAAApmxjA= Date: Tue, 10 Apr 2012 16:18:43 +0000 Message-ID: References: ,,, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.254.61] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org >I agree with this, there are a number of inconsistencies in the handling o= f indexes throughout the framework. I think that it is a worthwhile effort= to address them in this way. As Mike states, the number of side >effects = could be numerous. But with that being said, I think that changing this fr= om unsigned to signed may be the first step in identifying some of these si= de effects and possibly fix one or two incidental issues. As a >long time = flex developer, I would add a word of caution that this seems like a slippe= ry slope. Once we go down this path we may find a huge number of subsequen= t changes flying around. I think we will definitely >resolve some long pen= ding issues, but we should be very careful and aware that this could be a r= ather deep rabbit hole. I agree. I have identified about 20 inconsistencies so far in the way prope= rty change is dispatched or used in certain circumstances and I think the f= ixes will be great. Again though, I am not proposing any of these until we = have tests. If you look at the unit tests I wrote for ArrayList, you will s= ee things like "This demonstrates the way it works today, but are we sure w= e want this behavior," because I do think there are actually a number of is= sues that should be addressed. For example, using setItemAt, the CollectionChange event has a PropertyChan= geEvent for its items, and those items have oldValue, newValue and property= , which is actually the index. However, in the case of an add or remove, th= e items array actually contains the real item that was added or removed, no= t a PropertyChangeEvent. In this case of an update, the property change com= es first and the collection change second. In the case of an add or remove,= it is the opposite. Mike