Log all events to console.
These have been thought of before by other people
1- createInceptor functions on Ext.mixin.Observable
2- Override Ext.mixin.Observable
3- Override events on a component level
The application starts. The log functionality is enabled. A view gets rendered. The console prints which view and that it was rendered.
Another view gets rendered. The console prints which view and that it was rendered. And so on.
Sencha Touch 2.1
I can’t seem to log all events!
Note that this topic has been discussed before- frequently.
1- Explain to me how to do it correctly in a way that is tested and reproducible in ST2.
2- Or help me find errors in my code.
3- let me know if it’s not possible
I want to log both DOM events and “synthetic” events.
I want to be able to log all events after the applications is running and stop logging them at any time.
This is not a bug report!
In Ext.Js and Sencha Touch 1.1, these conceivably worked (strat 1)
In Sencha Touch 2.0, this may have worked (strat 2)
In Ext.Js, this must have worked (strat 1)
In Ext.Js, a different way using capture worked/works
In Ext.Js someone ran into the same problem as me for a brief period of time:
I’m having trouble logging all events to console, even though it has been debunked before.
Attempting to create interceptors on the observables prototype has no effect, and overriding the class also has no effect.
My code testing both methods is attached at the bottom in a zip (must change the paths to your sencha source and css in index.html).
Adding interceptors to the observable class definition- or anything close to it is much preferred. I’d like to avoid overriding because I’d like to be able to log all events and stop logging all events, and I’m not sure if you can detach an override. I don’t want to override things on the component level because it’s more code. I want it to be generic.
Any and all advice appreciated.