View Full Version : Ext.EventManager is undefined

4 Apr 2012, 7:03 AM
Trying to add a click handler to a div that is in my document (in Touch 2, but using ExtJS code in this case since the divs are totally in my control).

The code is basically

e = Ext.select( divSelector );
e.on( 'click', function(evt, el, o){
console.log( 'clicked' );
}, this, {} );

but during evaluating e.on I get the error

TypeError: 'undefined' is not an object (evaluating 'Ext.EventManager.on') at sencha-touch-all.js:13395

Tracing through the code, getting to that line, I can see that Ext.EventManager isn't, apparently, defined.

Am I defining something incorrectly in the setup? Google searches for the error seem to suggest I'm loading ExtJS incorrectly, but my index.html has

<script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script>

as set by the project starter generator. The app.json file has

"js": [
"path": "sdk/sencha-touch-all.js"
"path": "app.js",
"update": "delta"

I can't even figure out where to begin to diagnose this problem.

4 Apr 2012, 12:00 PM
I am not sure I understand .. are mixing ExtJS and ST2?


4 Apr 2012, 12:23 PM
Sorry for the disclarity.

I'm using an ExtJS feature Ext.Element.on() in a Sencha Touch 2 app.