Results 1 to 4 of 4

Thread: Bug in Loader code?

    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
    252
    Vote Rating
    -4
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,412
    Vote Rating
    1288
      0  

    Default

    This is usually due to a misspelling of the class name versus file name.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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
    252
    Vote Rating
    -4
      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
    18,428
    Vote Rating
    858
      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!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •