ze MX way, yes. So, um, I suggest you look at the visible property. Adding the child once in createChildren() then managing the visible property sounds better in the long run. If you really must add/remove the button, I'd say use updateDisplayList(), a good place for adding/removing dynamic children.
There's a crap ton of info on the life cycle, here is one such source http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf68641-7ff0.html Douglas Knudsen http://www.cubicleman.com this is my signature, like it? On Tue, Sep 6, 2011 at 1:47 PM, Nick Middleweek <n...@middleweek.co.uk>wrote: > ** > > > Hi Jeff, > > The component I'm working on is an Item Renderer for an Advanced Data Grid. > > I'm currently creating the button on onMouseOver() and then removing the > button on onMouseOut(). > > commitProperties() doesn't come into play unless I guess, I set a flag on a > setter and then call invalidateProperties() from the setter but would that > make any real difference? I mean, is it the same calling addChild(myButton) > from onMouseOver() function handler or from within commitProperties? > > Does anything naturally happen (life cycle wise) after commitProperties() > is invoked? > > > Thanks, > Nick > > > > On 6 September 2011 13:09, Jeffry Houser <jef...@dot-com-it.com> wrote: > >> ** >> >> >> >> I hav used commitProperties() in the past. Although some people will use >> commitProperties to call createChildren() if new children are needed to be >> created. >> >> However, I'd be cautious about creating children based on the >> update_complete event. It seems like an unnecessary way to force yet >> another full render of the component.. >> >> On 9/6/2011 5:28 AM, Nick Middleweek wrote: >> >> >> Hi, >> >> I've been trying to find the correct 'place' to create new components >> after the parent component is UPDATE_COMPLETE. >> >> During initialisation, we create child components in *createChildren()*but >> where/ when should we create them for e.g. in response to a mouseOver or >> a mouseClick event? >> >> Is it simply 'ok' to *this.addChild( *myNewButton *)* in a MOUSE_EVENT >> function handler or should I be setting some dirty flag to trigger off an >> invalidation and then add the button in a lifecycle override function? >> >> >> Thanks, >> Nick >> >> >> -- >> Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 >> 035 5424 } ); >> >> >> >> >> -- >> Jeffry Houser >> Technical Entrepreneur203-379-0773 >> --http://www.flextras.com?c=104 >> UI Flex Components: Tested! Supported! Ready! >> --http://www.theflexshow.comhttp://www.jeffryhouser.comhttp://www.asktheflexpert.com >> -- >> Part of the DotComIt Brain Trust >> >> > > > -- > Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 > 035 5424, blog: http://www.middleweek.co.uk } ); > > > >