--
You received this message because you are subscribed to the Google Groups "Swiz Framework" group.
To post to this group, send email to swiz-fr...@googlegroups.com.
To unsubscribe from this group, send email to swiz-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swiz-framework?hl=.
--
You received this message because you are subscribed to the Google Groups "Swiz Framework" group.
To post to this group, send email to swiz-fr...@googlegroups.com.
To unsubscribe from this group, send email to swiz-framewor...@googlegroups.com.
Ben
On Dec 16, 6:10 pm, Chris Scott <chris.scott....@gmail.com> wrote:
> Jesus, that's a potential major pain. Nice going flex sdk team!
>
> -c
>
> On Wed, Dec 16, 2009 at 3:03 PM, Ben Clinkinbeard <
>
> > swiz-framewor...@googlegroups.com<swiz-framework%2Bunsu...@googlegroups.com>
On Dec 17, 8:19 pm, Ben Clinkinbeard <ben.clinkinbe...@gmail.com>
wrote:
> There may actually be a decent fix for this. Turns out the ADDED event
> happens even before PREINITIALIZE, and its not suppressed by these
> changes because it is intrinsic to the player. Will be investigating
> it as a potential replacement soon.
>
Do remember that PREINITIALIZE and INITIALIZE, even in flex 3, happen
only
once in the life of a component, even if it's dettached and re-
attached
(either by states or by hand).
When Flex instantiates the components it sets its properties but holds
off the
rest of the lifecycle events (in the broad sense of things that
happen) until
the component has been attached to the display list. When a component
is
attached, a framework method, "initialize" will itself cause the
dispatch of
PREINITIALIZE, will run createChildren, and then will indirectly
dispatch
INITIALIZE (by calling another method called
"initializationComplete"). And
that's it for those events.
Likewise, CREATION_COMPLETE will only be dispatched once the
initialized
property has been set on the component by the flex framework. And
this will
only happen after the first round of validation has been completed
successfuly. That is, until commitProperties, measure and
updateDisplayList,
etc. have been run enough times (hopefully not that many!) so that
all the
invalidation flags have been cleared. Again, this will only happen
once for
each component.
My question would be, then, why would the components be unwired when
they
are removed from the display list?
Thanks,
Gabriel
> My question would be, then, why would the components be unwired when
> they are removed from the display list?
Because traditionally that has signaled the end of their life and been
a good place to clean up references to allow for GC. With the rise of
states in Flex 4 I think we'll need to add some sort of flag to turn
off the unwiring in response to display list removal.
Ben