Results 1 to 4 of 4

Thread: [2.1.1] Class loader tries to load already defined class

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-4066 in a recent build.
  1. #1

    Default [2.1.1] Class loader tries to load already defined class

    REQUIRED INFORMATION Ext version tested:
    • Sencha Touch 2.1.1

    Browser versions tested against:
    • Latest chrome

    • Sencha Touch class system tries to load class, that already was defined

    Steps to reproduce the problem:
    • Download the attachement
    • Unpack it to the /touch-2.1.1/examples folder
    • Open in the browser: touch-2.1.1/examples/class_loading_bug
    • Note that an exception about not found Class1 is reported in the console:
      Failed loading 'Class1.js', please verify that the file exists
    • Note, that Class1 is actually already defined in the classes.js

    The result that was expected:
    • Class loader should first mark the Class1 as "loaded", same for Class2. Then it should block the definition of Class2 until all the dependencies of Class1 are loaded. Then it can continue to definition of Class2 and other classes, depending on Class1.
    • In short - class loader should not try to load the class that was already defined with "Ext.define"

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL


    This is likely because Class1 is waiting for other classes to load until it can actually be defined and since the loading is async Class2 tries to get defined but requires Class1 which isn't defined as it's waiting.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:

    Posts are my own, not any current, past or future employer's.

  3. #3


    Right, and Class2 should wait in the same way as Class1 is waiting for its dependencies..

  4. #4
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Redwood City, California


    This has been fixed for the next release.

    Sencha Inc

    Jamie Avins


Posting Permissions

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