PDA

View Full Version : Using ext-all-debug.js versus ext-debug.js yields error ...



misterblinky
20 Dec 2011, 12:44 PM
I have an MVC app that I've been developing using ext-all-debug.js (as is normal). Works fine -- no problems. However I am now trying to build it using the SDK tools, so I've switched my index.html to point to ext-debug.js and the app breaks. In FF, I get the following error:


c is not a constructor

In Chrome, i get the error


Uncaught TypeError: object is not a function

Any suggestions? I thought these two libs would be interchangeable? What are the dependencies that need to be satified to use ext-debug.js?

thanks.

mitchellsimoens
20 Dec 2011, 12:46 PM
ext-all-*js has every class in it. ext-*.js only has the core and the widgets (grid, form, etc) are not in there.

misterblinky
20 Dec 2011, 1:13 PM
Hmm. Could it be that I need to explicitly require all the Ext classes I use in my application? I went back and read the Getting Started for Ext 4 and it suggests that we use ext-debug.js from the start. I used ext-all-debug.js, which perhaps masked the fact that I am not explicitly requiring all my classes.

So do i have to explicitly require all these classes? There are a lot of them (it's a big application).

thx

mitchellsimoens
20 Dec 2011, 1:18 PM
Yes. Using Ext.create will get you part of the way but if you are like me, I use xtypes a lot and using xtypes that aren't present will throw errors.