I have scenario in my app that allows me to open a detailed view multiple times during a itemdoubletap listener of a list. The event shows another view, which have a 'close button' that allows user to get back to list.
My problem is coused of that I am moving my application from Sencha Touch 1.0 and I have listeners declared in list configuration. The problem what I have observed in PR2 (in PR1 everything was working fine) is that my listeners declared in list configuration are deleted after first assignment to list/view.
The code is: (in debug version):
Is it a purposeful behavior and a good behavior to deleting that config? What should I do to avoid further problems with something like this? Couse now, of course, I could comment that lines and problem dissapear. But it is not a solution in case to Yours further releases.Code:constructor: function(config) { if (config) { if ('listeners' in config) { this.setListeners(config.listeners); delete config.listeners; } if ('bubbleEvents' in config) { this.setBubbleEvents(config.bubbleEvents); delete config.bubbleEvents; } } return this; }
Is is possible to check original configuration for listeners in component and restoring them if nothing change them during application lifecycle?