royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs] 04/29: Container needs removeAllChildren
Date Thu, 02 Aug 2018 00:44:07 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 e86f93bb0bdb0de4390eac3571710d8b1b304675
Author: Alex Harui <aharui@apache.org>
AuthorDate: Tue Jul 31 11:01:40 2018 -0700

    Container needs removeAllChildren
---
 .../MXRoyale/src/main/royale/mx/core/Container.as        | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
index 1f20148..63504f2 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
@@ -606,6 +606,22 @@ public class Container extends UIComponent
         dispatchEvent(new Event("initComplete"));
     }
     
+    /**
+     *  Removes all children from the child list of this container.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function removeAllChildren():void
+    {
+        while (numChildren > 0)
+        {
+            removeChildAt(0);
+        }
+    }
+    
 	/**
 	 *  @copy org.apache.royale.core.Application#MXMLDescriptor
 	 *  


Mime
View raw message