Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Fiddle not loading user-defined classes

  1. #11
    Sencha Premium User
    Join Date
    Mar 2010
    Location
    Atlanta, GA
    Posts
    40
    Vote Rating
    0
      0  

    Default

    Unfortunately I don't think so.

    The files seem to be created in alphabetical order so the following wont work

    File: MyApp/view/View.js
    Code:
    Ext.define('MyApp.view.View', {
            extend: 'Ext.view.View',
            ...
    });
    File: MyApp/view/DataView.js
    Code:
    Ext.define('MyApp.view.DataView', {
            extend: 'MyApp.view.View',
            ....
    });

    In the folder list 'DataView' appears alphabetically before 'View' so the code will be generated as follows
    Code:
    Ext.define('MyApp.view.DataView', {
            extend: 'MyApp.view.View',
            ....
    });
    Ext.define('MyApp.view.View', {
            extend: 'Ext.view.View',
            ...
    });
    As soo an Ext sees the " extend: 'Ext.view.View', " the loader will look for that class. It is not defined so will try to load it and fail. If the loader is disabled it will fail saying "MyApp.view.View is not defined"

  2. #12
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    So playing around with this code:

    Code:
    Ext.define('ClassB', {
        extend : 'ClassA'
    });
    
    Ext.define('ClassA', {});
    and of course it will try to load ClassA.js. Until I can work on a more robust solution, in Fiddle 1.1 I've come up with a way to pause and resume Ext.Loader and will insert Ext.Loader.pause() and Ext.Loader.resume() in the code automatically so there won't be anything you have to do, Fiddle will automatically insert this. Do note, the pause and resume aren't methods of Ext.Loader, Fiddle will be adding these methods.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #13
    Sencha User
    Join Date
    Dec 2011
    Posts
    242
    Answers
    1
    Vote Rating
    6
      0  

    Exclamation Ext.Loader not loading based on dependency

    Quote Originally Posted by mitchellsimoens View Post
    Like I said, the classes are dumped into the generated HTML. The order is the same order found in the tree as I just cascade through the tree store.
    Cmd is built in Java so it would be porting things but likely that would not be too fruitful of a mission. Writing from scratch is a better course.
    Changing order of files fixes my issue. But every time i open fiddle again, the order reverts back.

    If loading of files is based on tree sequence (which is very problematic) Shouldn't fiddle also save updated sequence of the tree structure?

    https://fiddle.sencha.com/#fiddle/6st

Page 2 of 2 FirstFirst 12

Posting Permissions

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