In UI component life cycle, I heard validation and invalidation events.
Please explain me about these events in short.
What does updateDisplayList()
method do in that life cycle.
Please explain me in short if possible.
Thank you in advance.
The Flex Component LifeCycle is a set of methods and events that Flex uses to set up components. In our own components, that extend the UIComponent class, we can listen to these events or override these methods to do stuff that is specific to our component.
I'll add that updateDisplayList() is a method, not an event, just in case their is any confusion.
These are the main overridable methods:
All of these methods will running during the initial component creation. However, three of these methods--commitProperties(), measure(), and updateDisplayList()--can be set up to run during the next render event. To prep them for run, just invalidate them using the appropriate invalidation method:
How often a render events fires depends on your application's frame rate. I think the default Flex frame rate is 24 frames per second, so there is one render event every 1/24th of a second.
I defined the component lifecycle as being a collection of methods and events. So, these are the events, in the order they fire:
updateComplete will fire after every renderer event, I believe. But the others are part of the component creation.
You should read the Flex documentation on this
The Spark Component Lifecycle adds different hooks to accommodate the two class approach; with one class for business logic and one for skinning. But, it sill extends the MX/Halo component Lifecycle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With