When I wrote this part of the lifecycle, I couldn't find an efficient way to 
allow your pattern.  So folks will have to instead use:

    <MyComp>
      <beads><CompModel attName=”val1”></beads>
    </MyComp>

We should add that to the doc somewhere.  You are welcome to investigate 
finding an efficient way to allow your proposed pattern.

HTH,
-Alex

On 4/17/19, 6:14 AM, "Yishay Weiss" <yishayj...@hotmail.com> wrote:

    I’ve encountered a problem with MXML initialization of components that have 
a model defined in MXML beads. Suppose I have the following MXML:
    
    <MyComp attName=”val1”>
      <beads><CompModel></beads>
    </MyComp>
    
    
    And the follow as3:
    
    class MyComp extends UIBase {
          public function set attName(value:*):void
                 {
                model.attName = value;
    }
    }
    
    model will be initialized before CompModel is added to beads so CompModel 
is never added to MyComp.
    
    Is this a bug? Is specifying a model in <beads/> bad practice?
    
    

Reply via email to