29 Nov 2012 9:21 AM #1
SenchaCmd 126.96.36.199 issues with Ext.Loader
This problem has been solved. Solution in Post #6.
In short, my application works great with Ext.Loader enabled but not built. However, after disabling Ext.Loader and building my application, it continues to try and load every file that has already been defined in single file that SenchaCmd compiled. It tries to load all of the files with an incorrect path and thus fails.
How can I stop my built, single js file from using Ext.Loader to load all of my classes? All of the classes are already defined in the single js file, but Loader doesn't seem to either notice or care that literally the entire application has already been loaded.
Here's what's happening in Firebug (this is a snippet... it goes on for much longer):
Error: [Ext.Loader] Failed loading 'NS/controller/Authentication.js', please verify that the file existsError: [Ext.Loader] Failed loading 'NS/controller/User.js', please verify that the file exists Error: [Ext.Loader] Failed loading 'NS/store/Users.js', please verify that the file exists Error: [Ext.Loader] Failed loading 'NS/view/UserEditor.js', please verify that the file exists
I have been working on this for days and any help would be appreciated. Thanks!
Last edited by krullj; 3 Dec 2012 at 9:23 AM. Reason: Used "However" too many times.
30 Nov 2012 2:58 AM #2
Need more code
Just to investigate your problem please post the app.js code.
30 Nov 2012 6:35 AM #3
Make sure the single file really has all of the classes in it. I just had an issue recently where only the Views were getting combined into the single file and the loader was trying to load each individual Controller file. None of the controllers, stores or models were compiled into the single file.
Between all the stuff I tried I think the two things that worked were:
Refreshing the bootstrap.js:
sencha app refresh
sencha compile -classpath=ext/src,app,resources,app.js page -name=page -in index.html -out=deploy/index.html and restore page and exclude -file ext/src and concat deploy/appClasses.js
30 Nov 2012 10:37 AM #4
Thank you for the responses.
In terms of using
sencha app refresh
I did try creating a bootstrap.js file manually by using the following code:
sencha compile --classpath=ext/src,ext/examples/ux,app,app.js meta -loader-paths -base-path . -out bootstrap.js and meta -alternates -append -out bootstrap.js and meta -alias -append -out bootstrap.js
As far as I can tell, every view, controller, model, etc are listed in the single built js file, including the ones that it tries to load.
2 Dec 2012 1:30 AM #5
Recreate app with CMD
I had an app not created by CMD. So I recognise the problem build the app. I generated an with the same name and copied all js, css, html, custom pics etc into the new empty app. After that I had no more problems with run CMD commands on the app. Be aware of that generate an app with the same name could overwrite the old one. So move the old app to another map before generate an empty new with the same name.
3 Dec 2012 9:09 AM #6
I finally found the solution to be, in my case, this:
sencha compile --classpath=ext/src,ext/examples/ux,app/model,app/store,app/view,app/controller,app/app.js union -recursive -file app/app.js concat all-classes.js