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 2016/09/21 22:23:23 UTC

[6/7] git commit: [flex-asjs] [refs/heads/spark] - changes to get hello world to launch without errors although no text appears

changes to get hello world to launch without errors although no text appears


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

Branch: refs/heads/spark
Commit: a936d77ac9d26136166f813723ab4348e7feea12
Parents: f1ff5f1
Author: Alex Harui <ah...@apache.org>
Authored: Fri Sep 16 11:21:41 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Sep 16 11:21:41 2016 -0700

----------------------------------------------------------------------
 .../MX/src/main/flex/flex/display/Sprite.as     | 24 ++++++++++++--------
 .../MX/src/main/flex/mx/core/Application.as     |  2 +-
 .../src/main/flex/mx/managers/SystemManager.as  |  3 +++
 .../src/main/flex/mx/styles/StyleProtoChain.as  | 23 ++++++++++++++++---
 .../MX/src/main/flex/mx/utils/OrderedObject.as  |  2 +-
 5 files changed, 40 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a936d77a/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as b/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
index 7ba75dc..64815a3 100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as
@@ -56,7 +56,7 @@ package flex.display
 		COMPILE::JS
 		public function getChildAt(index:int):DisplayObject
 		{
-			return getElementAt(index) as DisplayObject;
+			return super.getElementAt(index) as DisplayObject;
 		}
 		
 		COMPILE::JS
@@ -73,42 +73,48 @@ package flex.display
 		COMPILE::JS
 		public function getChildIndex(child:DisplayObject):int
 		{
-			return getElementIndex(child);
+			return super.getElementIndex(child);
 		}
 		
 		COMPILE::JS
 		public function setChildIndex(child:DisplayObject, index:int):void
 		{
-			removeElement(child);
-			addElementAt(child, index);
+			super.removeElement(child);
+			super.addElementAt(child, index);
 		}
 		
 		COMPILE::JS
 		public function addChild(child:DisplayObject):DisplayObject
 		{
-			addElement(child);
+			super.addElement(child);
 			return child;
 		}
 		
 		COMPILE::JS
 		public function addChildAt(child:DisplayObject, index:int):DisplayObject
 		{
-			addElementAt(child, index);
+            if (index >= super.numElements)
+            {
+                super.addElement(child);
+                return child;
+            }
+                
+			super.addElementAt(child, index);
 			return child;
 		}
 		
 		COMPILE::JS
 		public function removeChild(child:DisplayObject):DisplayObject
 		{
-			removeElement(child);
+			super.removeElement(child);
 			return child;
 		}
 		
 		COMPILE::JS
 		public function removeChildAt(index:int):DisplayObject
 		{
-			var child:DisplayObject = getChildAt(index);
-			removeElement(child);
+			var child:DisplayObject = super.getChildAt(index);
+			super.removeElement(child);
 			return child;
 		}
 		

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a936d77a/frameworks/projects/MX/src/main/flex/mx/core/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/core/Application.as b/frameworks/projects/MX/src/main/flex/mx/core/Application.as
index 9142894..04fd0a6 100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/Application.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/Application.as
@@ -1490,7 +1490,7 @@ public class Application extends LayoutContainer
         {
             focusManager = new FocusManager(this);
             var awm:IActiveWindowManager = 
-                IActiveWindowManager(sm.getImplementation("mx.managers::IActiveWindowManager"));
+                sm.getImplementation("mx.managers::IActiveWindowManager") as IActiveWindowManager;
             if (awm)
                 awm.activate(this);
             else

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a936d77a/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as b/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
index e6fc5b2..e682777 100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
@@ -2137,6 +2137,9 @@ public class SystemManager extends MovieClip
     {
         var mainClassName:String = info()["mainClassName"];
 
+        if (params && params.length > 0)
+            mainClassName = params[0];
+        
 		COMPILE::SWF
 		{
 			if (mainClassName == null)

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a936d77a/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as b/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
index ba6ea3f..ec4467b 100644
--- a/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
+++ b/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
@@ -54,10 +54,13 @@ import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.utils.NameUtil;
 import mx.utils.OrderedObject;
+COMPILE::SWF
+{
 import mx.utils.object_proxy;
+use namespace object_proxy;
+}
 
 use namespace mx_internal;
-use namespace object_proxy;
 
 [ExcludeClass]
 
@@ -809,7 +812,14 @@ public class StyleProtoChain
         var styleManager:IStyleManager2 = getStyleManager(object);
         var qualified:Boolean = styleManager.qualifiedTypeSelectors;
         var typeHierarchy:OrderedObject = getTypeHierarchy(object, styleManager, qualified);
-        return typeHierarchy.object_proxy::getObjectProperty(cssType) != null;
+        COMPILE::SWF
+        {
+            return typeHierarchy.object_proxy::getObjectProperty(cssType) != null;
+        }
+        COMPILE::JS
+        {
+            return typeHierarchy[cssType] != null;
+        }
     }
 
     /**
@@ -898,7 +908,14 @@ public class StyleProtoChain
                     else
                         type = NameUtil.getUnqualifiedClassName(className);
 
-                    hierarchy.object_proxy::setObjectProperty(type, true);
+                    COMPILE::SWF
+                    {
+                        hierarchy.object_proxy::setObjectProperty(type, true);
+                    }
+                    COMPILE::JS
+                    {
+                        hierarchy[type] = true;
+                    }
                     className = getQualifiedSuperclassName(
                         myApplicationDomain.getDefinition(className));
                 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a936d77a/frameworks/projects/MX/src/main/flex/mx/utils/OrderedObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/utils/OrderedObject.as b/frameworks/projects/MX/src/main/flex/mx/utils/OrderedObject.as
index b20c30e..5048fb3 100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/OrderedObject.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/OrderedObject.as
@@ -80,7 +80,7 @@ public dynamic class OrderedObject extends Proxy
 	COMPILE::SWF
     object_proxy var propertyList:Array;
 	COMPILE::JS
-	protected var propertyList:Array;
+	public var propertyList:Array;
 
     //--------------------------------------------------------------------------
     //