when is initialize component event fired?

when is initialize component event fired?

If I load dynamically a component inside a container for the first time (using add function), the initialize event is fired. Then if I remove the component (using remove function with autodestroy set to true) and I add it again, the initialize event is not fired.
Is that correct? When exactly is initialize event fired?

Ok.. but so, when I remove a component from its container, I destroy only the HTML element, not the javascript object: it remains in memory and is reused every time I add it again, never re-created, right?

Main.js:38Add component for the first time ..
Sub.js:29component added/created: initialize event fired!
Main.js:43Remove the component added (destroy set to true) ..
Main.js:50Add component for the second time ..

as it can see, the initialize event of "sub" component is fired only the first time it is added to "main" component: even if it is removed with destroy set to true, the second time the event is not fired.

Ok, after a lot of research and some tests, I understood that if I destroy a component, all refs to events for that component in controllers will "break" and so the listener does not catch anymore the event.

I'm having a lot of problems with this same issue. I am defining an Event on my controller to fire every time a panel is initialized. It only ever fires the FIRST TIME the panel is shown/painted/initialized. I've also tried the "painted" and "show" events and they do the same thing. Why is this happening?

As I said above, when you remove a component and then you add it again, all events in controllers with refs to that component refer to old object, not to the new one, so they don't work.
In my case, I've changed all the structure of the application to get it work, avoiding to use initialize event from controller.
Another solution could be here:http://www.sencha.com/forum/archive/...t-194698.html?