Results 1 to 8 of 8

Thread: Errors after compiling

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    7
    Vote Rating
    0
      0  

    Default Errors after compiling

    Hi everyone. I compiled my project via sencha cmd 3.0.0.230. After compile i navigate to http://meprojectlocalhost.com, but my project not rendering and console of browser displays following errors:

    Code:
    
    
    • Uncaught Error: [Ext.Loader] Failed loading 'MyApp/model/MyModel1.js', please verify that the file exists all-classes.js:10092
    • Uncaught Error: [Ext.Loader] Failed loading 'MyApp/store/MyStore1.js', please verify that the file exists
    and etc. on all my models and stores. Please note what next address http://myprojectlocalhost.com/MyApp/model/MyModel1.js?_dc=1357902265764
    where MyApp is namespace my project (ie example MyApp.model.Model1)

    All models and stores in file all-classes.js is. Below code my app.js in all-classes.js/

    PHP Code:
    Ext.Loader.setConfig({    enabledfalse,    paths: {        'Ext''js/extjs4/src',        'Ext.ux''js/extjs4/ux',        'MyApp''/js/gisjs'    }});

    Ext.require('Ext.layout.*');Ext.require('MyApp.controller.*');Ext.require('MyApp.store.*');Ext.require('MyApp.model.*');


    Ext.application({    name'MyApp',    appFolder'/app',    controllers: ['MyController'],    autoCreateViewportfalse,    launch: function() {        var access this.getController('Main').accsesData;        Ext.create('MyApp.view.Viewport', {            accessaccess        });        Ext.QuickTips.init();    }}); 
    I tried comment out setConfig and Ext.require, but failure. Once i remove stores from my controller errors disappear. Version of the ExtJS is 4.1.1a.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,336
    Vote Rating
    1296
      0  

    Default

    Your stores use the models so they should require the models.
    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 User
    Join Date
    Dec 2012
    Posts
    7
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Your stores use the models so they should require the models.
    I add to config of stores the following line
    PHP Code:
    requires: ['MyApp.model.MyModel1'
    and errors associated with the models disappeared, but similar errors associated with stores remained
    HTML Code:
    Uncaught Error: [Ext.Loader] Failed loading 'MyApp/store/MyStore1.js', please verify that the file exists

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,336
    Vote Rating
    1296
      0  

    Default

    Ok, so the classes that use the store needs to require the store. You can see a pattern forming here where if class A uses class B at all you should require class B in class A.
    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.

  5. #5
    Sencha User
    Join Date
    Dec 2012
    Posts
    7
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Ok, so the classes that use the store needs to require the store. You can see a pattern forming here where if class A uses class B at all you should require class B in class A.
    Such variant i tried, but without result. Interestingly that if Ext tries to load stores dynamically, why it appeals to myproject.com/MyApp/store/MyStore.js, when it should to appeal to myproject.com/app/store/MyStore.js, look my app.js. Is not there or something I do not understand?

  6. #6
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,336
    Vote Rating
    1296
      0  

    Default

    It should try and load from /js/gisjs/store/MyStore.js as you have a path for MyApp to /js/gisjs. Did you update the bootstrap.js file at all? I ask because you are using the wildcards which I'm not a fan of but should technically work.
    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.

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
  •