Learning : How does Ext JS listen/attach listeners before component creation
Learning : How does Ext JS listen/attach listeners before component creation
According to the MVC Application Architecture, the controller's init method is called before the launch() method of the Application is called. In the same tutorial, the component is created in the launch() method, where as the init() method calls the control() method of the Controller classand starts listening to the events before the components are created . How does Ext JS hold the events before and then attach the events to the appropriate components after the components are created?
Yes, I did go through that class earlier too. From what I understood, they seem to have reversed it. Instead of looping through the handlers attached to the events on a component, they loop through all the selectors defined in all the controllers that are bound to the event and then fire the matching handlers.