Tuesday, August 13, 2013

Touch 2- Painted event not recognized/listened by the controller

In one of our projects, after upgrading to sencha touch 2.2, we noticed that the painted event was not being recognized in the controller. After a lot of search on the forums and google we somehow managed to get it working. Basically we need to add the following code in the view, whose painted event is being listened to in the controller:
  initialize: function() {
        this.callParent();
        this.relayEvents(this.element, ['painted']);
    }