I was reading the sencha docs about Event handling and the listeners config. In the documentation of the listener config I found this note :
Note: It is bad practice to specify a listener's config when you are defining a class using Ext.define(). Instead, only specify listeners when you are instantiating your class with Ext.create().
I have seen a number of S.O. answers which have listeners in the Ext.define()
.
Also I came accross this blog post about the evils of Ext.define and listeners but i think this is more relevant to Ext-Js than to Sencha Touch 2. And I am fairly new to Sencha Touch.
Can anyone explain the difference cons of adding listeners in the Ext.define() and what difference does it make?