O'Reilly logo

Sencha Touch 2 Mobile JavaScript Framework by Bryan P. Johnson, John Earl Clark

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding listeners and handlers

Every component in Sencha Touch has a long list of events that it generates. Given the number of components you will likely have in your application, you can expect a lot of chatter.

Imagine a party with 100 people, all having lots of different conversations. Now imagine trying to pick out all of the useful information from each conversation. It's impossible. You have to focus on a specific conversation in order to gather anything useful.

In the same way, components also have to be told what to listen for, or else our unfortunate partygoer would quickly be overwhelmed. Fortunately for us, there's a configuration for that.

The listeners configuration tells the component what events it needs to pay attention to. Listeners ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required