Hybrid View
-
11 Jan 2013 6:22 AM #1
Errors after compiling
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:
and etc. on all my models and stores. Please note what next address http://myprojectlocalhost.com/MyApp/model/MyModel1.js?_dc=1357902265764Code:- 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
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/
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.PHP Code:Ext.Loader.setConfig({ enabled: false, 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'], autoCreateViewport: false, launch: function() { var access = this.getController('Main').accsesData; Ext.create('MyApp.view.Viewport', { access: access }); Ext.QuickTips.init(); }});
-
14 Jan 2013 2:44 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
Your stores use the models so they should require the models.
Mitchell 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.
-
14 Jan 2013 11:27 PM #3
I add to config of stores the following line
and errors associated with the models disappeared, but similar errors associated with stores remainedPHP Code:requires: ['MyApp.model.MyModel1']
HTML Code:Uncaught Error: [Ext.Loader] Failed loading 'MyApp/store/MyStore1.js', please verify that the file exists
-
15 Jan 2013 7:29 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
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 @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.
-
16 Jan 2013 1:41 AM #5
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?
-
16 Jan 2013 7:39 AM #6Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
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 @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.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote