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
    Sencha - Community Support Team SamuraiJack1's Avatar
    Join Date
    May 2008
    Posts
    554
    Vote Rating
    3
    SamuraiJack1 will become famous soon enough

      0  

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

    [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
    Description:
    • 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"
    class_loading_bug.zip

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Vote Rating
    846
    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 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 @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 - Community Support Team SamuraiJack1's Avatar
    Join Date
    May 2008
    Posts
    554
    Vote Rating
    3
    SamuraiJack1 will become famous soon enough

      0  

    Default


    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
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    This has been fixed for the next release.

    Sencha Inc

    Jamie Avins

    @jamieavins

Thread Participants: 2