You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2021/10/04 06:44:37 UTC

[royale-asjs] branch develop updated: try to fix mxtests. rawChildren might need to be redirected through Container's strandChildren if there are other problems

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

aharui 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 d965af7  try to fix mxtests.  rawChildren might need to be redirected through Container's strandChildren if there are other problems
d965af7 is described below

commit d965af76cdcb0ea4d5f4d7afb953f913c1b925a5
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Oct 3 23:43:20 2021 -0700

    try to fix mxtests.  rawChildren might need to be redirected through Container's strandChildren if there are other problems
---
 .../royale/mx/core/ContainerRawChildrenList.as     | 29 ++++++++++++++--------
 .../src/main/royale/mx/core/IUITextField.as        |  6 ++---
 .../src/main/royale/mx/core/UITextField.as         |  6 ++---
 mustella/src/main/royale/UnitTester.as             | 20 +++++++--------
 4 files changed, 35 insertions(+), 26 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/ContainerRawChildrenList.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/ContainerRawChildrenList.as
index df1f405..a5f7778 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/ContainerRawChildrenList.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/ContainerRawChildrenList.as
@@ -20,7 +20,7 @@
 package mx.core
 {
 
-import mx.core.UIComponent;
+import mx.core.IUIComponent;
 import org.apache.royale.geom.Point;
 
 use namespace mx_internal;
@@ -147,7 +147,8 @@ public class ContainerRawChildrenList implements IChildList
     /**
      *  @private
      */
-    public function addChild(child:UIComponent):UIComponent
+    [SWFOverride(params="flash.display.DisplayObject", altparams="mx.core.UIComponent", returns="flash.display.DisplayObject"))]
+    public function addChild(child:IUIComponent):IUIComponent
     {
         // return owner.rawChildren_addChild(child);
 		return null;
@@ -156,7 +157,8 @@ public class ContainerRawChildrenList implements IChildList
     /**
      *  @private
      */
-    public function addChildAt(child:UIComponent, index:int):UIComponent
+    [SWFOverride(params="flash.display.DisplayObject,int", altparams="mx.core.UIComponent,int", returns="flash.display.DisplayObject"))]
+    public function addChildAt(child:IUIComponent, index:int):IUIComponent
     {
         // return owner.rawChildren_addChildAt(child, index);
 		return null;
@@ -165,7 +167,8 @@ public class ContainerRawChildrenList implements IChildList
     /**
      *  @private
      */
-    public function removeChild(child:UIComponent):UIComponent
+    [SWFOverride(params="flash.display.DisplayObject", altparams="mx.core.UIComponent", returns="flash.display.DisplayObject"))]
+    public function removeChild(child:IUIComponent):IUIComponent
     {
         // return owner.rawChildren_removeChild(child);
 		return null;
@@ -174,7 +177,8 @@ public class ContainerRawChildrenList implements IChildList
     /**
      *  @private
      */
-    public function removeChildAt(index:int):UIComponent
+    [SWFOverride(returns="flash.display.DisplayObject"))]
+    public function removeChildAt(index:int):IUIComponent
     {
         // return owner.rawChildren_removeChildAt(index);
 		return null;
@@ -183,7 +187,8 @@ public class ContainerRawChildrenList implements IChildList
     /**
      *  @private
      */
-    public function getChildAt(index:int):UIComponent
+    [SWFOverride(returns="flash.display.DisplayObject"))]
+    public function getChildAt(index:int):IUIComponent
     {
         // return owner.rawChildren_getChildAt(index);
 		return null;
@@ -192,7 +197,8 @@ public class ContainerRawChildrenList implements IChildList
     /**
      *  @private
      */
-    public function getChildByName(name:String):UIComponent
+    [SWFOverride(returns="flash.display.DisplayObject"))]
+    public function getChildByName(name:String):IUIComponent
     {
         // return owner.rawChildren_getChildByName(name);
 		return null;
@@ -201,7 +207,8 @@ public class ContainerRawChildrenList implements IChildList
     /**
      *  @private
      */
-    public function getChildIndex(child:UIComponent):int
+    [SWFOverride(params="flash.display.DisplayObject", altparams="mx.core.UIComponent"))]
+    public function getChildIndex(child:IUIComponent):int
     {
         // return owner.rawChildren_getChildIndex(child);
 		return null;
@@ -210,7 +217,8 @@ public class ContainerRawChildrenList implements IChildList
     /**
      *  @private
      */
-    public function setChildIndex(child:UIComponent, newIndex:int):void
+    [SWFOverride(params="flash.display.DisplayObject,int", altparams="mx.core.UIComponent,int"))]
+    public function setChildIndex(child:IUIComponent, newIndex:int):void
     {       
         // owner.rawChildren_setChildIndex(child, newIndex);
     }
@@ -227,7 +235,8 @@ public class ContainerRawChildrenList implements IChildList
     /**
      *  @private
      */
-    public function contains(child:UIComponent):Boolean
+    [SWFOverride(params="flash.display.DisplayObject", altparams="mx.core.UIComponent"))]
+    public function contains(child:IUIComponent):Boolean
     {
         // return owner.rawChildren_contains(child);
 		return null;
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUITextField.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUITextField.as
index 0424e0c..921a1da 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUITextField.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUITextField.as
@@ -187,10 +187,10 @@ package mx.core
 		 *  @playerversion AIR 1.1
 		 *  @productversion Flex 3
 		 */
-		function get backgroundColor():uint;
-		function set backgroundColor(value:uint):void;
+		function get backgroundColor():Object;
+		function set backgroundColor(value:Object):void;
         
     }
     
 }
-
+
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as
index 62f6762..e2fc885 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as
@@ -3050,11 +3050,11 @@ public class UITextField  extends UIComponent implements IUITextField
 
 	 public var _backgroundColor:uint = 0xFFFFFF;
 	 
-	 override public function get backgroundColor():uint {
+	 override public function get backgroundColor():Object {
 		return _backgroundColor;
 	 }
-	 override public function set backgroundColor(value:uint):void {
-		_backgroundColor = value;
+	 override public function set backgroundColor(value:Object):void {
+		_backgroundColor = value as uint;
 	 }
 }
 
diff --git a/mustella/src/main/royale/UnitTester.as b/mustella/src/main/royale/UnitTester.as
index 8d03ff3..1ee5bc4 100644
--- a/mustella/src/main/royale/UnitTester.as
+++ b/mustella/src/main/royale/UnitTester.as
@@ -1125,16 +1125,7 @@ public class UnitTester extends EventDispatcher
 			if (obj is DisplayObjectContainer)
 			{
 				var doc:DisplayObjectContainer = obj as DisplayObjectContainer;
-				if ("rawChildren" in doc)
-				{
-					var rc:Object = doc["rawChildren"];
-					n = rc.numChildren;
-					for (i = 0; i < n; i++)
-					{
-						_getObjectsUnderPoint(rc.getChildAt(i), pt, arr);
-					}
-				}
-                else if ("strandChildren" in doc)
+                if ("strandChildren" in doc)
                 {
                     var sc:Object = doc["strandChildren"];
                     n = sc.numElements;
@@ -1143,6 +1134,15 @@ public class UnitTester extends EventDispatcher
                         _getObjectsUnderPoint(sc.getElementAt(i), pt, arr);
                     }
                 }
+				else if ("rawChildren" in doc)
+				{
+					var rc:Object = doc["rawChildren"];
+					n = rc.numChildren;
+					for (i = 0; i < n; i++)
+					{
+						_getObjectsUnderPoint(rc.getChildAt(i), pt, arr);
+					}
+				}
 				else
 				{
 					if (doc.numChildren)