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 AB915105A5 for ; Thu, 13 Mar 2014 20:55:47 +0000 (UTC) Received: (qmail 76064 invoked by uid 500); 13 Mar 2014 20:55:43 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 76035 invoked by uid 500); 13 Mar 2014 20:55:42 -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 76023 invoked by uid 99); 13 Mar 2014 20:55:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2014 20:55:42 +0000 Date: Thu, 13 Mar 2014 20:55:42 +0000 (UTC) From: "Maurice Amsellem (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLEX-34143) Give an event handle. 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-34143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13934040#comment-13934040 ] Maurice Amsellem commented on FLEX-34143: ----------------------------------------- However, since fx:Binding is not really a tag, but a compiler construct, I have no idea how it could be changed to address your change. > Give an event handle. > ------------------------------------ > > Key: FLEX-34143 > URL: https://issues.apache.org/jira/browse/FLEX-34143 > Project: Apache Flex > Issue Type: Improvement > Components: Data Binding > Reporter: Gary Yang > Original Estimate: 672h > Remaining Estimate: 672h > > 1st of all, Flex Binding is great!!! > I am using it this way: > >>>>>>>>>>>>>>>>>code>>>>>>>>>>>> > [Bindable("dataChange")] > public function get rowData():VLogicTreeGridRow{ > return data as VLogicTreeGridRow; > } > private var _cellData:VLogicTreeGridCell; > [Bindable(event="cellDataChanged")] > public function get cellData():VLogicTreeGridCell{ > return _cellData; > } > private function set rfrCellData( v:* ):void{ > if( rowData != null > && logicTreeGrid.columns != null && logicTreeGrid.columns.length > 0 > && rowData.cellList != null && rowData.cellList.length > 0 > ){ > var idx:int = logicTreeGrid.columns.getItemIndex( treeGridColLogic ); > var rt:VLogicTreeGridCell = rowData.cellList.getItemAt( idx ) as VLogicTreeGridCell; > if( _cellData != rt ){ > _cellData = rt; > dispatchEvent( new Event( "cellDataChanged" ) ); > } > } > } > ]]> > > > > > > <<<<<<<<<<<<<< Because the destination of Binding tag can only be setters, I have to use it this way if I want to handle changes from the Binding sources, do you think it's possible to add a handle for Binding tag so that I can see exactly what event caused the change please? > So that it can be like this > >>>>>>>>>>>>>>>>>code>>>>>>>>>>>> > private function refreshCellData( ev:Event ):void{ > if( ev is CollectionEvent ){ > > } > else if( ev is PropertyChangeEvent ){ > > } > if( rowData != null > && logicTreeGrid.columns != null && logicTreeGrid.columns.length > 0 > && rowData.cellList != null && rowData.cellList.length > 0 > ){ > var idx:int = logicTreeGrid.columns.getItemIndex( treeGridColLogic ); > var rt:VLogicTreeGridCell = rowData.cellList.getItemAt( idx ) as VLogicTreeGridCell; > if( _cellData != rt ){ > _cellData = rt; > dispatchEvent( new Event( "cellDataChanged" ) ); > } > } > } > ]]> > > > > > > <<<<<<<<<<<<<< This is going to be very useful!!! -- This message was sent by Atlassian JIRA (v6.2#6252)