Component Writer's Guide :: Execution Order
When you run a form, several methods are called in an specific order, it's useful for you to know this order, because you may need it when developing components. This is the order:
- unserialize() for all the page components
- loaded() for all the page components
- preinit() for all the page components
- init() for all the page components
The right moment to process events is the init(), because all page components have been loaded and all properties have been fixed up to the right reference, if they are object properties. To fixup properties, the right method to override is loaded().