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 8FD5E109C8 for ; Sun, 2 Mar 2014 12:38:57 +0000 (UTC) Received: (qmail 63118 invoked by uid 500); 2 Mar 2014 12:38:57 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 62950 invoked by uid 500); 2 Mar 2014 12:38:53 -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 62933 invoked by uid 99); 2 Mar 2014 12:38:52 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Mar 2014 12:38:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C27D39329CC; Sun, 2 Mar 2014 12:38:51 +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 Message-Id: <58a2c3409a57494ab592642feb48a636@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: [flex-asjs] [refs/heads/develop] - solved text input change thanks to Alex stopinmediatepropagation and setting the listener in constructor Date: Sun, 2 Mar 2014 12:38:51 +0000 (UTC) Repository: flex-asjs Updated Branches: refs/heads/develop 86d14e243 -> 3d7e4f0e0 solved text input change thanks to Alex stopinmediatepropagation and setting the listener in constructor Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3d7e4f0e Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3d7e4f0e Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3d7e4f0e Branch: refs/heads/develop Commit: 3d7e4f0e0e8dfdb12b413d030a1e656479f827e6 Parents: 86d14e2 Author: Carlos Rovira Authored: Sun Mar 2 13:38:41 2014 +0100 Committer: Carlos Rovira Committed: Sun Mar 2 13:38:41 2014 +0100 ---------------------------------------------------------------------- .../src/org/apache/flex/events/Event.as | 2 ++ .../flex/html/staticControls/TextInput.as | 27 +++----------------- 2 files changed, 6 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3d7e4f0e/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as index 4c23e7f..764240e 100644 --- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as +++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as @@ -35,6 +35,8 @@ package org.apache.flex.events */ public class Event extends flash.events.Event { + public static const CHANGE:String = "change"; + /** * Constructor. * http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3d7e4f0e/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 7b3ff90..ce85fa4 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,9 +19,8 @@ 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. * @@ -54,6 +53,8 @@ package org.apache.flex.html.staticControls public function TextInput() { super(); + + model.addEventListener("textChange", textChangeHandler); } /** @@ -97,25 +98,6 @@ 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 @@ -127,8 +109,7 @@ package org.apache.flex.html.staticControls */ public function textChangeHandler(event:Event):void { - // this is not working as expected - dispatchEvent(new Event("change")); + dispatchEvent(new Event(Event.CHANGE)); } } } \ No newline at end of file