-
29 Dec 2011 10:00 AM #1
Bug in Loader code?
Bug in Loader code?
Ext version tested:
- Ext 4.0.7
- FireFox 8, Chrome 16.0.912.63 m
- html
- I should mention that I have YET to get ext-dev.js to run my app, this is the ONLY error message I get though and it appears to be spurious. If it isn't, please let me know what I should be doing here.
- I get this error message while using ext-dev.js:
- Uncaught Ext.Error: The following classes are not declared even if their files have been loaded: ''. Please check the source code of their corresponding files for possible typos: ''
- The class being loaded is always Ext.data.writer.Writer
- Load my app?
- No error message
- See description
In onFileLoaded, the code in bold should be added to prevent this spurious warning (I think).
Code:... if (missingClasses.length < 1) { return; } missingClasses = Ext.Array.filter(missingClasses, function(item) { return !this.requiresMap.hasOwnProperty(item); }, this); if (missingClasses.length < 1) { // This code is missing return; } for (i = 0,ln = missingClasses.length; i < ln; i++) { missingPaths.push(this.classNameToFilePathMap[missingClasses[i]]); } ...
Last edited by mark0978; 29 Dec 2011 at 10:02 AM. Reason: Resized the code font.
-
29 Dec 2011 12:52 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,581
- Vote Rating
- 433
This is usually due to a misspelling of the class name versus file name.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
29 Dec 2011 2:28 PM #3
But in this case, the name is '' and the file it is having trouble with is Ext.writer.Writer which I don't explicitly use.
Look at the code I included, it looks to see if there are any missingClasses, then it removes all the ones that currently exist and NEVER checks to see if there are still missing Classes....... it just raises the error.
And My code does work with ext-all-debug.js
-
1 Jan 2012 10:58 PM #4
Your stuff will always work with ext-all-debug, because it includes every class. From looking at the code, it loops over the missing classes, so if the length is 0, then it won't push any missing path on, so the second check would be redundant.
You'll need to post a test case, but I don't think this looks like a bug.Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote