royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs] 01/12: add $ methods so they can be overridden
Date Thu, 22 Mar 2018 21:30:12 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit c6f6680fbce88287fd369569a24377b716d4f577
Author: Alex Harui <aharui@apache.org>
AuthorDate: Thu Mar 22 11:58:39 2018 -0700

    add $ methods so they can be overridden
---
 .../main/royale/org/apache/royale/core/UIBase.as   | 70 ++++++++++++++++++----
 1 file changed, 58 insertions(+), 12 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 b80f377..12b0d02 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
@@ -30,8 +30,8 @@ package org.apache.royale.core
 	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.events.MouseEvent;
 	import org.apache.royale.events.ValueChangeEvent;
+	import org.apache.royale.utils.StringUtil;
 	import org.apache.royale.utils.loadBeadFromValuesManager;
-    import org.apache.royale.utils.StringUtil;
 
     COMPILE::JS
     {
@@ -1181,13 +1181,13 @@ package org.apache.royale.core
                 if (c is IUIBase)
                 {
                     if (c is IRenderedObject)
-                        addChild(IRenderedObject(c).$displayObject);
+                        $addChild(IRenderedObject(c).$displayObject);
                     else
-                        addChild(c as DisplayObject);                        
+                        $addChild(c as DisplayObject);                        
                     IUIBase(c).addedToParent();
                 }
                 else
-                    addChild(c as DisplayObject);
+                    $addChild(c as DisplayObject);
             }
             COMPILE::JS
             {
@@ -1212,13 +1212,13 @@ package org.apache.royale.core
                 if (c is IUIBase)
                 {
                     if (c is IRenderedObject)
-                        addChildAt(IUIBase(c).$displayObject, index);
+                        $addChildAt(IUIBase(c).$displayObject, index);
                     else
-                        addChildAt(c as DisplayObject, index);
+                        $addChildAt(c as DisplayObject, index);
                     IUIBase(c).addedToParent();
                 }
                 else
-                    addChildAt(c as DisplayObject, index);
+                    $addChildAt(c as DisplayObject, index);
             }
             COMPILE::JS
             {
@@ -1246,7 +1246,7 @@ package org.apache.royale.core
         {
             COMPILE::SWF
             {
-                return getChildAt(index) as IChild;
+                return $getChildAt(index) as IChild;
             }
             COMPILE::JS
             {
@@ -1272,9 +1272,9 @@ package org.apache.royale.core
             COMPILE::SWF
             {
                 if (c is IRenderedObject)
-                    return getChildIndex(IRenderedObject(c).$displayObject);
+                    return $getChildIndex(IRenderedObject(c).$displayObject);
                 else
-                    return getChildIndex(c as DisplayObject);
+                    return $getChildIndex(c as DisplayObject);
             }
             COMPILE::JS
             {
@@ -1303,9 +1303,9 @@ package org.apache.royale.core
             COMPILE::SWF
             {
                 if (c is IRenderedObject)
-                    removeChild(IRenderedObject(c).$displayObject);
+                    $removeChild(IRenderedObject(c).$displayObject);
                 else
-                    removeChild(c as DisplayObject);
+                    $removeChild(c as DisplayObject);
             }
             COMPILE::JS
             {
@@ -1576,6 +1576,52 @@ package org.apache.royale.core
             return super.dispatchEvent(event);
         }
         }
+        
+        COMPILE::SWF
+        public function $addChild(child:DisplayObject):DisplayObject
+        {
+            return super.addChild(child);
+        }
+        COMPILE::SWF
+        public function $addChildAt(child:DisplayObject, index:int):DisplayObject
+        {
+            return super.addChild(child, int);
+        }
+        COMPILE::SWF
+        public function $removeChildAt(index:int):DisplayObject
+        {
+            return super.removeChildAt(int);
+        }
+        COMPILE::SWF
+        public function $removeChild(child:DisplayObject):DisplayObject
+        {
+            return super.removeChild(child);
+        }
+        COMPILE::SWF
+        public function $getChildAt(index:int):DisplayObject
+        {
+            return super.getChildAt(int);
+        }
+        COMPILE::SWF
+        public function $setChildIndex(index:int):void
+        {
+            super.setChildIndex(int);
+        }
+        COMPILE::SWF
+        public function $getChildIndex(child:DisplayObject):int
+        {
+            return super.getChildIndex(child);
+        }
+        COMPILE::SWF
+        public function $getChildByName(name:String):DisplayObject
+        {
+            return super.getChildByName(name);
+        }
+        COMPILE::SWF
+        public function get $numChildren():int
+        {
+            return super.numChildren;
+        }
 
 	}
 }

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.

Mime
View raw message