-
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,714
- Vote Rating
- 438
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,714
- Vote Rating
- 438
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,714
- Vote Rating
- 438
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.
-
17 Jan 2013 1:15 AM #7
Sorry, is all right /js/gisjs. Yes, i update the bootstrap.js file. Please you look at my steps, maybe i do something wrong?
#1
#2Code:sencha compile -classpath=gisjs meta -alias -out build/bootstrap.js and meta -alt -append -out build/bootstrap.js and meta -loader -append -out build/bootstrap.js
The gotten file bootstrap.js i add to my index.html
#3Code:<!-- <x-compile> --> <!-- <x-bootstrap> --> <script src="extjs4/ext-dev.js" type="text/javascript"></script> <script src="build/bootstrap.js" type="text/javascript"></script> <!-- </x-bootstrap> --> <script src="gisjs/app.js" type="text/javascript"></script> <!-- </x-compile> -->
Code:sencha -debug compile -classpath=extjs4/src,extjs4/ux,gisjs page -i index.html -o build/index.html
-
22 Jan 2013 12:20 AM #8
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote