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 6D207100A0 for ; Sat, 1 Mar 2014 10:48:03 +0000 (UTC) Received: (qmail 20047 invoked by uid 500); 1 Mar 2014 10:48:03 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 19862 invoked by uid 500); 1 Mar 2014 10:48:01 -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 19822 invoked by uid 99); 1 Mar 2014 10:47:50 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Mar 2014 10:47:50 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 01C41932165; Sat, 1 Mar 2014 10:47:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: carlosrovira@apache.org To: commits@flex.apache.org Date: Sat, 01 Mar 2014 10:47:49 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: [flex-asjs] [refs/heads/develop] - added change event to TextInput to be dispatched when textChange fires. This need revision since is not working as expected. Repository: flex-asjs Updated Branches: refs/heads/develop c7547b689 -> b45e0a373 added change event to TextInput to be dispatched when textChange fires. This need revision since is not working as expected. Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/dc2d8364 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/dc2d8364 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/dc2d8364 Branch: refs/heads/develop Commit: dc2d8364393aa29df8c38f3fb91082bfab4f6036 Parents: c7547b6 Author: Carlos Rovira Authored: Sat Mar 1 11:44:47 2014 +0100 Committer: Carlos Rovira Committed: Sat Mar 1 11:44:47 2014 +0100 ---------------------------------------------------------------------- .../flex/html/staticControls/TextInput.as | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dc2d8364/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextInput.as ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextInput.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextInput.as index 66ae3c7..7b3ff90 100644 --- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextInput.as +++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextInput.as @@ -19,7 +19,19 @@ package org.apache.flex.html.staticControls { import org.apache.flex.core.ITextModel; import org.apache.flex.core.UIBase; + import org.apache.flex.core.IStrand; + import org.apache.flex.events.Event; + /** + * Dispatched when the user changes the text. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + [Event(name="change", type="org.apache.flex.events.Event")] + /** * The TextInput class implements the basic control for * single-line text input. @@ -86,5 +98,37 @@ package org.apache.flex.html.staticControls ITextModel(model).html = value; } + private var _strand:IStrand; + + /** + * @copy org.apache.flex.core.IBead#strand + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function set strand(value:IStrand):void + { + _strand = value; + + // this is not working as expected + model = UIBase(_strand).model as ITextModel; + model.addEventListener("textChange", textChangeHandler); + } + + /** + * @dispatch change event in response to a textChange event + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function textChangeHandler(event:Event):void + { + // this is not working as expected + dispatchEvent(new Event("change")); + } } } \ No newline at end of file