What is the equivalent in ST2 of the ST1 Ext.util.Observable.capture call? I made use of this method quite a bit in debugging to see all events coming off an object and the timing of the calls. If possible I would like to continue using it.
Printable View
What is the equivalent in ST2 of the ST1 Ext.util.Observable.capture call? I made use of this method quite a bit in debugging to see all events coming off an object and the timing of the calls. If possible I would like to continue using it.
There isn't one built in. All the capture function did was create an interceptor to the fireEvent function. So what you could do is override Ext.mixin.Obervable hook into the fireEvent and fireAction methods:
Code:Ext.define('Override.mixin.Observable', {
override : 'Ext.mixin.Observable',
fireEvent : function(eventName) {
console.log(eventName);
this.callOverridden(arguments);
},
fireAction : function(eventName) {
console.log(eventName);
this.callOverridden(arguments);
}
});
yes it is. Just like your application classes can be dynamically loaded, using Ext.define for overrides can now be dynamically loaded also.