> Yes, listenerlist.remove() is how the listener is removed. The question is: > When is the listener removed?
As Todd said, it is up to the application. For example, if you wanted to remove an event listener from a button that had been removed from the component hierarchy, you could either listen for componentRemoved() on the button's parent container or parentChanged() on the button itself. > The initialize call is defining a component lifecycle, like it or not, and I > know of no proper lifecycles that have a start without a stop or an add > without a remove. I didn't see any mention of uninitialize() in the Flex docs, but maybe I missed something. Either way, as I said earlier, this interface isn't mean to define any kind of life cycle for Pivot components, and it isn't an attempt to emulate Flex behavior. initialize() simply means that WTKXSerializer has finished loading the component and has called bind(). To me, this is a pretty clear definition of what it does and when it is called. Note that it is also entirely a WTKX construct. What you might call component "lifecycle" already exist at the component/container level (see above). Defining lifecycle events in WTKX would limit access to those events to developers using WTKX. For example, if you were building your UI programmatically in Java or using a Groovy Pivot builder, you wouldn't be able to respond to those events. We designed Pivot such that it does not have a hard dependency on WTKX for just this reason.
