I'm in a very strange situation, when I use ext-debug.js in my index.jsp file, my application works fine, but when I try to use the minified version of ext-debug.js which is ext.js, my application fails, I'm getting an "Uncaught TypeError: Cannot call method substring of undefined". The problem appears in the method that parses the namespace of the class I want to instantiate. But why this method works fine on the unminified version of extjs? And more importantly what should I do to fix the error? Any ideas? How should I debug this since it appears only in the minified version?
Asked
Active
Viewed 234 times
0
-
Have you tried minifying ext-debug.js yourself and see if it works ? – Alex Sep 24 '13 at 09:18
-
Good idea, I'm a beginner in extjs, how do I do that? Also I have to add the fact that I have to use Sencha Tools 2.0, not the Sencha Cmd because my application is too customized to just adapt it easily. Not sure if I need Sencha Cmd to do the minifying process you mention. – niceman Sep 24 '13 at 09:39
-
1jscompress.com is one of many online tools: just copy&paste the plain js there and use the output – Alex Sep 24 '13 at 10:56
-
No luck, I'm getting even more unexpected errors, like Uncaught TypeReference Ext not defined. The only way it works is using the ext-debug.js. – niceman Sep 24 '13 at 13:01
-
1If you're using Chrome Dev Tools to do your debugging, you can 'prettify' the minified code to see exactly where it's failing. Look for the button in the bottom-right corner that looks like this `{}` – Towler Sep 27 '13 at 01:20
-
Ok, just found the button you mention. – niceman Sep 27 '13 at 07:42
-
Debugging the production version of my application, I noticed that the execution flow enters into some of my application files which normally should be already compressed into the app-all.js file. At least this is what I understand it should be happening. So when I debug the production version of my application I expect the execution flow to enter only into the 2 compressed files: ext.js and app-all.js. Am I right? Maybe my app-all.js file isn't correctly generated, although I don't get any errors? – niceman Sep 27 '13 at 08:27
2 Answers
0
I haven't beeing able to resolve this, but one of my colleagues did, all I can say is he used Sencha Cmd, the last version available. So thank you for your help

niceman
- 161
- 1
- 3
- 11
0
I had a similar problem... ext.js gave me an "ext is undefined" error, whereas ext-debug.js gave me no errors. So weird. I used http://jscompress.com/ to compress ext-debug.js, and saved it was ext-debug-compressed.js, and used that and now it's working and only slightly larger file than ext.js (254kb instead of 231kb). Note, however, that I had to save it with notepad. Wordpad would not paste the long line of code correctly, and it was giving errors if I tried to save it with wordpad.

Aaron Brown
- 281
- 1
- 5
- 13