I verified that the component I am creating does have the creationComplete event defined but it is not firing…should I be listening for the childCreated event on the view stack instead?

 

Thanks again for the info and assist

 


From: [email protected] [mailto:[email protected]] On Behalf Of Gordon Smith
Sent: Tuesday, January 17, 2006 10:51 AM
To: [email protected]
Subject: RE: [flexcoders] Destroying/Re-creating Objects

 

"The layout and some of the initialization has not been completed"

Completed by when? The LayoutManager runs asynchronously. When
createChild() returns, the new child won't exist, but its
commitProperties(), measure(), and updateDisplayList() methods won't
have been called yet. By the time the new child dispatches its
creationComplete event, they should all have been called.

Other than this timing issue, how is createChild() failing?

- Gordon

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Rob Dickey
Sent: Tuesday, January 17, 2006 9:30 AM
To: [email protected]
Subject: [flexcoders] Destroying/Re-creating Objects

Sanity Check needed :)

I have a scenario where I need to destroy and recreate all child objects
of
a view stack.

I'm first using the viewStack.destroyAllChildren() (or
viewStack.destroyChildAt(index)) which destroy the child objects as
expected, but when I attempt to re-create using the
viewStack.createChild()
I run into some unexpected results.  It appears from debugging, etc.
that
the new child objects appear ok structurally but the layout and some of
the
initialization has not been completed. The creation policy of the view
stack
and child objects are not explicitly stated so the default is being
used.

So am I doing this correctly? Is there another / better way to
destroy/recreate child objects dynamically?

Thanks for any info.

Regards,
Rob



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to