You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2017/05/01 03:13:10 UTC

[4/7] flex-asjs git commit: call super.addedToParent first before checking for existence of IFormatBead’s

call super.addedToParent first before checking for existence of IFormatBead\u2019s


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/90514e7e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/90514e7e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/90514e7e

Branch: refs/heads/dual
Commit: 90514e7e472455fb541e9e6cd5069e694cd0eb1b
Parents: 94e4647
Author: Justin Mclean <jm...@apache.org>
Authored: Tue Apr 25 09:06:44 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Tue Apr 25 09:06:44 2017 +1000

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/html/DateField.as | 33 +++++---------------
 1 file changed, 7 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/90514e7e/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/DateField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/DateField.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/DateField.as
index ca142ba..a4d9d27 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/DateField.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/DateField.as
@@ -67,34 +67,15 @@ package org.apache.flex.html
 		 */
 		override public function addedToParent():void
 		{
-            var klass:* = ValuesManager.valuesImpl.getValue(this,"iFormatBead");
-            var bead:IBead = new klass() as IBead;
-            if (bead) {
-                addBead(bead);
-            }
-            
 			super.addedToParent();
-		}
 
-		/**
-		 *  Replace existing format bead if it exists.
-		 *
-		 *  @copy org.apache.flex.core.IStrand#addBead()
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		override public function addBead(bead:IBead):void
-		{
-			if (bead is IFormatBead) {
-				var formatBead:IBead = getBeadByType(IFormatBead);
-				if (formatBead != null) {
-					removeBead(formatBead);
-				}
-			}
-			super.addBead(bead);
+			if (getBeadByType(IFormatBead) == null) {
+                var klass:* = ValuesManager.valuesImpl.getValue(this, "iFormatBead");
+                var bead:IBead = new klass() as IBead;
+                if (bead) {
+                    addBead(bead);
+                }
+            }
 		}
 		
 		/**