Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Huntsville
    Posts
    227
    Vote Rating
    -6
    mark0978 is infamous around these parts mark0978 is infamous around these parts

      0  

    Default Bug in Loader code?

    Bug in Loader code?


    Ext version tested:
    • Ext 4.0.7
    Browser versions tested against:
    • FireFox 8, Chrome 16.0.912.63 m
    DOCTYPE tested against:
    • html
    Description:
    • 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
    Steps to reproduce the problem:
    • Load my app?
    The result that was expected:
    • No error message
    The result that occurs instead:
    • See description
    Test Case:
    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.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,620
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This is usually due to a misspelling of the class name versus file name.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Huntsville
    Posts
    227
    Vote Rating
    -6
    mark0978 is infamous around these parts mark0978 is infamous around these parts

      0  

    Default


    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

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,655
    Vote Rating
    583
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    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!

Thread Participants: 2

Tags for this Thread