10 Replies Latest reply on Mar 30, 2011 4:29 AM by CleanCoder

    how to get elements from skin class?


      Hi all,


      I am completely stacked with getting elements being defined directly in a skin class. To illustrate:


      I have a component of the SkinnableComponent type having in its turn, specific skinClass:



      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" ...  >

      <header:ApplicationHeader width="100%" height="30"/>




      <s:SkinnableComponent ...  skinClass="components.header.ApplicationHeaderSkin">



      And the ApplicationHeaderSkin defines some elements inside it:

      <s:Skin ...>


           <s:HGroup >

                <s:Label id="label1" color="white" />

                <s:Button id="button" width="36" height="100%" />





      The original task is to instrument the ApplicationHeader skinnableComponent to make it accessible for automation tools. For this purpose i need to create a delegate class with getAutomationChildren and getAutomationChildAt method. The delegate is constructed with the SkinnableCompoment obj (the ApplicationHeader in my case).


      So the question is: how to get children (or elements in context of flex 4) defined in a skin class by having only host component reference of this skin?


      I will appreciate any hint, any reference to a similar problem description.

      Great thanks in advance