1. #1
    Ext JS Premium Member
    Join Date
    Jul 2011
    Posts
    33
    Vote Rating
    0
    FPXdeveloper_4 is on a distinguished road

      0  

    Default Finding app folder outside of current path

    Finding app folder outside of current path


    Because I'm operating on a strange server setup (which wont be changed) my app folder is located outside of the webpage's current path. Say the webpage is located at:
    www.myhost.com/abc/index.html
    Then my application file would be at
    www.myhost.com/xui/app.js

    To handle this, my application has the following code
    Code:
    Ext.Loader.setConfig({
        enabled:true,
        paths: {
            'Ext.ux': '../xui/ux',
            'app': '../xui/app'
        }
    });
    Which works until I run it through the builder, upon which I get the following error:
    Failed to load resource: the server responded with a status of 404 (Not Found) http://www.myhost.com/abc/app/model/SectionModel.js
    Somehow my ../xui got lost so it is still looking for my code inside of abc which doesn't have it.

    It seems as if the problem is that the loader code above is in the application, which is the last thing to be included in app-all.js. If I hand-edit app-all.js to relocate the loader code to the top, then everything works. I don't think I should have to hand-edit this file though.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,220
    Vote Rating
    859
    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


    Did you set the appFolder in the Ext.application?

    http://docs.sencha.com/ext-js/4-0/#!...-cfg-appFolder

    What happens is Ext.app.Application adds the path into the Loader depending on the name and the appFolder properties which will overwrite any paths you set in the Loader.setConfig
    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
    Ext JS Premium Member
    Join Date
    Jul 2011
    Posts
    33
    Vote Rating
    0
    FPXdeveloper_4 is on a distinguished road

      0  

    Default


    Cool thanks.

Thread Participants: 1