flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [2/2] git commit: [flex-sdk] - FLEX-22502 Implemented DATA_CHANGE event when editing date in text field
Date Sun, 28 Apr 2013 00:46:54 GMT
FLEX-22502 Implemented DATA_CHANGE event when editing date in text field


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/497387cd
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/497387cd
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/497387cd

Branch: refs/heads/develop
Commit: 497387cda352ba3c9851e5532c37f63236363d7f
Parents: f7c6f34
Author: Justin Mclean <jmclean@apache.org>
Authored: Sun Apr 28 10:46:35 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Sun Apr 28 10:46:35 2013 +1000

----------------------------------------------------------------------
 .../projects/mx/src/mx/controls/DateField.as       |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/497387cd/frameworks/projects/mx/src/mx/controls/DateField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mx/src/mx/controls/DateField.as b/frameworks/projects/mx/src/mx/controls/DateField.as
index a9e86bd..ef6622a 100644
--- a/frameworks/projects/mx/src/mx/controls/DateField.as
+++ b/frameworks/projects/mx/src/mx/controls/DateField.as
@@ -2035,6 +2035,8 @@ public class DateField extends ComboBase
         textInput.mouseChildren = true;
         textInput.mouseEnabled = true;
         textInput.addEventListener(TextEvent.TEXT_INPUT, textInput_textInputHandler);
+		textInput.addEventListener(Event.CHANGE, onTextInputChange);
+		
         // hide the border, we use the text input's border
         if (border)
             border.visible = false;
@@ -2276,6 +2278,14 @@ public class DateField extends ComboBase
         monthSymbol = monthSymbolOverride;
         yearSymbol = yearSymbolOverride;
     }
+	
+	/**
+	 *  @private
+	 */
+	protected function onTextInputChange(event:Event = null):void
+	{
+		dispatchEvent(new ItemEditEvent(ItemEditEvent.DATA_CHANGE, true));
+	}
 
     //--------------------------------------------------------------------------
     //


Mime
View raw message