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

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

commit c2fdcbfee32e66ca5b76543bc5450c72de5ca9f8
Author: Yishay Weiss <[email protected]>
AuthorDate: Sun Aug 28 23:09:32 2022 -0700

    Emulation - Naive implementation of getChildByName, I have not considered 
containers
---
 .../projects/MXRoyale/src/main/royale/mx/core/UIComponent.as     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index ee1884f5e8..d2631e4d79 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -4080,7 +4080,14 @@ COMPILE::JS
     { override }
     public function getChildByName(name:String):IUIComponent
     {
-        trace("getChildByName not implemented");
+        for (var i:int = 0; i < numChildren; i++)
+        {
+            var child:IUIComponent = getChildAt(i);
+            if (child.name == name)
+            {
+                return child;
+            }
+        }
         return null;
     }
 

Reply via email to