Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3257F200BB5 for ; Sun, 6 Nov 2016 17:02:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 30EC0160AE8; Sun, 6 Nov 2016 16:02:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 75FFF160AFC for ; Sun, 6 Nov 2016 17:02:01 +0100 (CET) Received: (qmail 75570 invoked by uid 500); 6 Nov 2016 16:01:59 -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 75561 invoked by uid 99); 6 Nov 2016 16:01:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Nov 2016 16:01:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B55FF2C0005 for ; Sun, 6 Nov 2016 16:01:59 +0000 (UTC) Date: Sun, 6 Nov 2016 16:01:59 +0000 (UTC) From: "Mihai Chira (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-34880) Sort and SortField state setters are now behind mx_internal and out of the interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 06 Nov 2016 16:02:02 -0000 [ https://issues.apache.org/jira/browse/FLEX-34880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mihai Chira updated FLEX-34880: ------------------------------- Summary: Sort and SortField state setters are now behind mx_internal and out of the interfaces (was: Place Sort and SortField state setters behind mx_internal) > Sort and SortField state setters are now behind mx_internal and out of the interfaces > ------------------------------------------------------------------------------------- > > Key: FLEX-34880 > URL: https://issues.apache.org/jira/browse/FLEX-34880 > Project: Apache Flex > Issue Type: Sub-task > Components: Spark: Sort and SortField > Affects Versions: Apache Flex 4.15.0 > Reporter: Mihai Chira > Assignee: Mihai Chira > Fix For: Apache Flex 4.16.0 > > > h1. The change > (Both mx and spark) {{Sort}} and {{SortField}} will be transitioned to immutable objects to prevent bugs like FLEX-34853. In this step we are: > # _removing the state setters from the interfaces_ ({{ISort}} and {{ISortField}}). > # _hiding the state setters behind the {{mx_internal}} namespace_. This also implies renaming them (because a getter and a setter with different namespaces throw a compile error). The pattern is: {{public function set compareFunction(c:Function):void}} becomes {{mx_internal function set compareFunction_(c:Function):void}}. > h1. Usage > h3. Before > {code} > var sortField:ISortField = new SortField(); > sortField.name = "title"; > sortField.descending = true; > sortField.numeric = false; > sortField.sortCompareType = SortFieldCompareTypes.STRING; > sortField.compareFunction = titleCompareFunction; > {code} > h3. After; Version 1 (_preferred_) > {code} > var sortField:ISortField = new SortField("title", true, false, SortFieldCompareTypes.STRING, titleCompareFunction); > {code} > h3. After; Version 2 (_deprecated, invalid in future versions_) > {code} > var sortField:ISortField = new SortField(); > SortField(sortField).mx_internal::name_ = "title"; > SortField(sortField).mx_internal::descending_ = true; > SortField(sortField).mx_internal::numeric_ = false; > SortField(sortField).mx_internal::sortCompareType_ = SortFieldCompareTypes.STRING; > SortField(sortField).mx_internal::compareFunction_ = someCompareFunction; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)