Results 1 to 3 of 3

Thread: Finding app folder outside of current path

  1. #1
    Ext JS Premium Member
    Join Date
    Jul 2011
    Posts
    33
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Vote Rating
    1271
      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 @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. #3
    Ext JS Premium Member
    Join Date
    Jul 2011
    Posts
    33
    Vote Rating
    0
      0  

    Default

    Cool thanks.

Posting Permissions

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