Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D2268DB1F for ; Wed, 15 May 2013 04:45:02 +0000 (UTC) Received: (qmail 64346 invoked by uid 500); 15 May 2013 04:45:02 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 62879 invoked by uid 500); 15 May 2013 04:44:46 -0000 Mailing-List: contact commits-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 commits@flex.apache.org Received: (qmail 62646 invoked by uid 99); 15 May 2013 04:44:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 04:44:34 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aharui@adobe.com designates 64.18.1.233 as permitted sender) Received: from [64.18.1.233] (HELO exprod6og118.obsmtp.com) (64.18.1.233) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 04:44:27 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob118.postini.com ([64.18.5.12]) with SMTP ID DSNKUZMSlUzxMfrMxMBcQ+OfZzG8xXweqU1G@postini.com; Tue, 14 May 2013 21:44:07 PDT Received: from inner-relay-4.eur.adobe.com (inner-relay-4b [10.128.4.237]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r4F4i499003138; Tue, 14 May 2013 21:44:04 -0700 (PDT) Received: from nacas03.corp.adobe.com (nacas03.corp.adobe.com [10.8.189.121]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id r4F4i3GU025950; Tue, 14 May 2013 21:44:03 -0700 (PDT) Received: from NAMBX02.corp.adobe.com ([10.8.127.96]) by nacas03.corp.adobe.com ([10.8.189.121]) with mapi; Tue, 14 May 2013 21:44:02 -0700 From: Alex Harui To: "dev@flex.apache.org" , "commits@flex.apache.org" Date: Tue, 14 May 2013 21:44:00 -0700 Subject: Re: git commit: [flex-sdk] [refs/heads/develop] - FLEX-16857 Fixed RTE when adding items after setting sort to null Thread-Topic: git commit: [flex-sdk] [refs/heads/develop] - FLEX-16857 Fixed RTE when adding items after setting sort to null Thread-Index: Ac5N36GyekLU45WZRjC5Oo+zWtbaRADRy91/ Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-Entourage/13.16.0.130206 acceptlanguage: en-US 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 Justin, Thanks for dealing with the DateValidator failure. I have another one for you. =20 This change is causing a failure in the mustella test: tests/gumbo/components/DataGrid/Properties/DataGrid_Properties_sortable column_withEditor_test002. Did this test pass for you? I looked at FLEX-16857, and IMO, it is not a bug. The code is not calling refresh after setting sort =3D null and before adding items. I haven't tri= ed it, but I suspect that would avoid the error. The documentation is pretty clear that calling refresh() is required, although I suppose we could updat= e the doc to further specify that this is true even when setting sort =3D nul= l. On the other hand, the Spark DG is doing something questionable. When the GridItemEditor goes to save the new data, the editor saves any current sort= , sets sort =3D null, then saves the new, then restores the sort and does not call refresh(). As far as I can tell, this is an attempt to retain the position of the edited item in the Grid. I guess they didn't want the Grid to jump to a new position or have the edited item disappear off-screen if the new data caused the sort to move the item in the collection. Because this change sets localIndex =3D null right when sort =3D null, the localInd= ex is tossed and the new "order" is unsorted order and the test fails. So, I think there are two options: 1) verify that refresh() avoids the RTE in FLEX-16857, revert this change and maybe update the doc 2) change the behavior of Spark DG when you edit an item in the sort column= . Thoughts? I'm pretty sure MX DG jumps around when you edit an item in the sort column, but this would be a change in behavior for Spark DG users. I'd probably choose #1 as maybe there are other folks relying on localIndex staying around until you call refresh(), but if you feel strongly that ListCollectionView should be more tolerant of setting sort=3Dnull and not calling refresh() and it is ok to change behavior on Spark DG users, I'd be ok with that (and of course, would pass an complaints on to you :-)). -Alex On 5/10/13 5:36 PM, "jmclean@apache.org" wrote: > Updated Branches: > refs/heads/develop 9f21583b8 -> 3b98c1d09 >=20 >=20 > FLEX-16857 Fixed RTE when adding items after setting sort to null >=20 >=20 > Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo > Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/3b98c1d0 > Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/3b98c1d0 > Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/3b98c1d0 >=20 > Branch: refs/heads/develop > Commit: 3b98c1d096742c4f35b51f28ead2e6827677960a > Parents: 9f21583 > Author: Justin Mclean > Authored: Sat May 11 10:34:47 2013 +1000 > Committer: Justin Mclean > Committed: Sat May 11 10:34:47 2013 +1000 >=20 > ---------------------------------------------------------------------- > .../src/mx/collections/ListCollectionView.as | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > ---------------------------------------------------------------------- >=20 >=20 > http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/3b98c1d0/frameworks/= proje > cts/framework/src/mx/collections/ListCollectionView.as > ---------------------------------------------------------------------- > diff --git=20 > a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as > b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as > index afce033..dcffed1 100644 > --- a/frameworks/projects/framework/src/mx/collections/ListCollectionView= .as > +++ b/frameworks/projects/framework/src/mx/collections/ListCollectionView= .as > @@ -378,6 +378,10 @@ public class ListCollectionView extends Proxy > public function set sort(s:ISort):void > { > _sort =3D s; > + =20 > + if (s =3D=3D null) > + localIndex =3D null; > + =20 > dispatchEvent(new Event("sortChanged")); > } > =20 >=20 --=20 Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui