I may be missing the point, and if I am am, then sorry in advance.

createChildren should only be called once it is actually added to a 
displayList. So couldn't you just override this method in your child 
and set a 'flag' or do whatever you need.

--- In [email protected], "reflexactions" 
<[EMAIL PROTECTED]> wrote:
>
> There is an "add" event but I think this only gets fired if your 
are 
> attaching to a Container not a UIComponent.
> 
> 
> There is an "added" event however the addedHandler is declared 
> private in UIComponent so cant be overridden.
> 
> I guess I could duplicate what UIComponent does and add 
> another "added" event Handler (called something else instead of 
> course, though it  bugs me a component needs to create multiple 
event 
> handler for the same event, see earlier post). This fires before 
the 
> component is initialized so I think the logic would be in the 
handler 
> to check the "initialized" flah and if false do nothing and pick 
> everything up in the initialization complete function, if true 
> execute the code here.
> 
> 
> Thanks 
> 
> 
> --- In [email protected], "reflexactions" 
> <reflexactions@> wrote:
> >
> > Just wondering what sure fired way there is for a component to 
know 
> its 
> > been added as the child of something (a UIComponent, a 
> > DisplayContainer)?
> > 
> > parentChanged - called BEFORE the component is added, no good
> > 
> > stylesInitialized - called BEFORE and also I think potentially 
> before 
> > the components createChildren, so no good
> > 
> > initialize - called AFTER being added, ok thats good 
> but..initilaize is 
> > only called if the component hasnt been intialized already. So 
its 
> not 
> > garaunteed to always be called.. ( However I am having a hard 
time 
> > finding where "initialized" gets set, from what I can see it set 
by 
> the 
> > LayoutManager, but does that mean if my component is added as a 
> child 
> > of a basic UIComponent LayoutManager wont be called and 
> > therefore "initialized" would never get set to true so the 
function 
> > initilized will always get called...??????)
> > 
> > Thanks
> >
>


Reply via email to