RE: [flexcoders] Destroying/Re-creating Objects

2006-01-17 Thread Gordon Smith
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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rob Dickey
Sent: Tuesday, January 17, 2006 9:30 AM
To: flexcoders@yahoogroups.com
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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Destroying/Re-creating Objects

2006-01-17 Thread Rob Dickey
I believe that is the issue...after sending the email I realized that I am
not waiting for the creationComplete event to be dispatched on each child
before attempting to use the child. 

Thanks for the response. 

Rob


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gordon Smith
Sent: Tuesday, January 17, 2006 10:51 AM
To: flexcoders@yahoogroups.com
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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rob Dickey
Sent: Tuesday, January 17, 2006 9:30 AM
To: flexcoders@yahoogroups.com
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 


SPONSORED LINKS 
Web site design development 
Computer software development 
Software design and development 
Macromedia flex 
Software development best practice 



YAHOO! GROUPS LINKS 

•  Visit your group flexcoders on the web.
  
•  To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
•  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 





--
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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Destroying/Re-creating Objects

2006-01-17 Thread Rob Dickey










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



Thanks again for the info and assist











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Gordon Smith
Sent: Tuesday, January 17, 2006
10:51 AM
To: flexcoders@yahoogroups.com
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: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Rob Dickey
Sent: Tuesday, January 17, 2006 9:30 AM
To: flexcoders@yahoogroups.com
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Destroying/Re-creating Objects

2006-01-17 Thread Gordon Smith










If you're using Flex 2 and it isn't
firing, please file a bug.



But are you registering for the event by
doing



 newChild.addEventListener(creationComplete,
creationCompleteHandler);



?



- Gordon











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rob Dickey
Sent: Tuesday, January 17, 2006
12:37 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
Destroying/Re-creating Objects





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



Thanks again for the info and assist











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Gordon Smith
Sent: Tuesday, January 17, 2006
10:51 AM
To: flexcoders@yahoogroups.com
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: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Rob Dickey
Sent: Tuesday, January 17, 2006 9:30 AM
To: flexcoders@yahoogroups.com
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.