Now that we have seen how events and controllers fit together, we need to take a look at the other uses and options available to us with events.
While Sencha Touch components respond to a large number of events, it can sometimes be helpful to fire custom events within your application.
For example, you could fire a custom event called
vikinginvasion, which might trigger additional actions within your application. For this example, we will assume we have a component called
cmp. We can fire events with this component simply by calling:
You can then add a listener to any component in the
control section of your controller for
vikinginvasion, along with a function to handle the event. ...