-
30 Nov 2011 2:33 PM #1
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
Which works until I run it through the builder, upon which I get the following error:Code:Ext.Loader.setConfig({ enabled:true, paths: { 'Ext.ux': '../xui/ux', 'app': '../xui/app' } });
Somehow my ../xui got lost so it is still looking for my code inside of abc which doesn't have it.Failed to load resource: the server responded with a status of 404 (Not Found) http://www.myhost.com/abc/app/model/SectionModel.js
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.
-
1 Dec 2011 9:09 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,681
- Vote Rating
- 435
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.setConfigMitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
1 Dec 2011 9:11 AM #3
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote