You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2022/01/01 22:11:13 UTC

[royale-asjs] branch develop updated: It seems like overridding addBead was not necessary at all

This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new b33ba8c  It seems like overridding addBead was not necessary at all
b33ba8c is described below

commit b33ba8c5b2a34fe2bfcd02569dab8b83e5611c04
Author: Harbs <ha...@in-tools.com>
AuthorDate: Sun Jan 2 00:11:00 2022 +0200

    It seems like overridding addBead was not necessary at all
---
 .../main/royale/org/apache/royale/core/UIBase.as   | 35 ++++------------------
 1 file changed, 5 insertions(+), 30 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
index ce36810..83d1465 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
@@ -1130,34 +1130,6 @@ package org.apache.royale.core
 			return (this as IChild).parent as EventDispatcher;
 		}
 		
-        
-        /**
-         *  @copy org.apache.royale.core.IStrand#addBead()
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9
-         *  @royaleignorecoercion org.apache.royale.core.IBeadModel
-         *  @royaleignorecoercion org.apache.royale.core.IBeadView
-         */        
-		override public function addBead(bead:IBead):void
-		{
-            var isView:Boolean;
-			
-			super.addBead(bead);
-            //TODO This check for model does not seem to make sense. There used to be a model assignment here.
-            // It does not look to me like model is being assigned anywhere anymore and that probably needs to be fixed - Harbs @1/1/22
-			if (this._model !== bead && bead is IBeadView) {
-				_view = bead as IBeadView;
-				isView = true
-			}
-			
-			if (isView) {
-				sendEvent(this,"viewChanged");
-			}
-		}
-		
         /**
          *  @copy org.apache.royale.core.IParent#addElement()
          * 
@@ -1414,12 +1386,15 @@ package org.apache.royale.core
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.9.8
+         *  @royaleignorecoercion org.apache.royale.core.IBeadView
+         * 
          */
         protected function loadBeads():void
         {
-			loadBeadFromValuesManager(IBeadModel, "iBeadModel", this);
-            loadBeadFromValuesManager(IBeadView, "iBeadView", this);
+			_model = loadBeadFromValuesManager(IBeadModel, "iBeadModel", this) as IBeadModel;
+            _view = loadBeadFromValuesManager(IBeadView, "iBeadView", this) as IBeadView;
 			loadBeadFromValuesManager(IBeadController, "iBeadController", this);
+            sendEvent(this,"viewChanged");
         }
 
         private var _measurementBead:IMeasurementBead;