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 2D96F18402 for ; Sun, 7 Jun 2015 16:19:01 +0000 (UTC) Received: (qmail 49024 invoked by uid 500); 7 Jun 2015 16:19:00 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 48997 invoked by uid 500); 7 Jun 2015 16:19:00 -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 48987 invoked by uid 99); 7 Jun 2015 16:19:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Jun 2015 16:19:00 +0000 Date: Sun, 7 Jun 2015 16:19:00 +0000 (UTC) From: "Mihai Chira (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-34853) ListCollectionView.getItemIndex throws RTE when the Sort's sortFields change 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-34853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mihai Chira updated FLEX-34853: ------------------------------- Description: {code} _sut.addAll(from4To0); //values["name"]: Object4, Object3, Object2, Object1, Object0 const sortByIndexAscending:Sort = new Sort(); sortByIndexAscending.fields = [new SortField("index", false, false, true)]; _sut.sort = sortByIndexAscending; _sut.refresh(); //should be: Object0, Object1, Object2, Object3, Object4 //when sortByIndexAscending.fields = [new SortField("name", false, true, false)]; //should have no effect //then assertThat(_sut.getItemIndex(from4To0.getItemAt(i)) != -1); //an RTE is thrown here {code} *Expected behaviour*: the collection should redo the sort when any of its sort's flags changes, or whenever one of the sortFields' flags changes. *Note*: the solution being pursued is to make Sort and SortField immutable. See more of the discussion [here|http://mail-archives.apache.org/mod_mbox/flex-dev/201505.mbox/%3CCAP1cEXG8%2BM1AXM_5CPVJseTpY3cppgRJY%2BnuHJ1gL-VcB%3D3z3A%40mail.gmail.com%3E]. was: {code} _sut.addAll(from4To0); //values["name"]: Object4, Object3, Object2, Object1, Object0 const sortByIndexAscending:Sort = new Sort(); sortByIndexAscending.fields = [new SortField("index", false, false, true)]; _sut.sort = sortByIndexAscending; _sut.refresh(); //should be: Object0, Object1, Object2, Object3, Object4 //when sortByIndexAscending.fields = [new SortField("name", false, true, false)]; //should have no effect //then assertThat(_sut.getItemIndex(from4To0.getItemAt(i)) != -1); //an RTE is thrown here {code} *Expected behaviour*: the collection should redo the sort when any of its sort's flags changes, or whenever one of the sortFields' flags changes. *Note*: the solution being pursued is to make Sort and SortField immutable. See more of the discussion here. > ListCollectionView.getItemIndex throws RTE when the Sort's sortFields change > ---------------------------------------------------------------------------- > > Key: FLEX-34853 > URL: https://issues.apache.org/jira/browse/FLEX-34853 > Project: Apache Flex > Issue Type: Bug > Components: Collections, Spark: Sort and SortField > Affects Versions: Apache Flex 4.14.1 > Reporter: Mihai Chira > Assignee: Mihai Chira > Fix For: Apache Flex 4.15.0 > > > {code} > _sut.addAll(from4To0); //values["name"]: Object4, Object3, Object2, Object1, Object0 > const sortByIndexAscending:Sort = new Sort(); > sortByIndexAscending.fields = [new SortField("index", false, false, true)]; > _sut.sort = sortByIndexAscending; > _sut.refresh(); //should be: Object0, Object1, Object2, Object3, Object4 > //when > sortByIndexAscending.fields = [new SortField("name", false, true, false)]; //should have no effect > //then > assertThat(_sut.getItemIndex(from4To0.getItemAt(i)) != -1); //an RTE is thrown here > {code} > *Expected behaviour*: the collection should redo the sort when any of its sort's flags changes, or whenever one of the sortFields' flags changes. > *Note*: the solution being pursued is to make Sort and SortField immutable. See more of the discussion [here|http://mail-archives.apache.org/mod_mbox/flex-dev/201505.mbox/%3CCAP1cEXG8%2BM1AXM_5CPVJseTpY3cppgRJY%2BnuHJ1gL-VcB%3D3z3A%40mail.gmail.com%3E]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)