-
21 Jan 2013 5:33 AM #1
AppFolder specification in all-classes.js [ExtJs 4.1.1a, Sencha cmd 3.0.0.250]
AppFolder specification in all-classes.js [ExtJs 4.1.1a, Sencha cmd 3.0.0.250]
Hi all,
In order to reduce file loading, I've compiled my app and I've followed this process:
1) Generate the bootstrap.js by this sencha cmd command:
2) Specify <x-compile> and <-bootstrap> tag like this:Code:C:\wamp\www\aris\interface\app>sencha compile -classpath=../app meta -alias -out ../build/bootstrap.js and meta -alt -append -out ../build/bootstrap.js and meta -loader -append -out ../build/bootstrap.js
3) Compilation through this command:HTML Code:<html> <head> <title>Test</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"> <link rel="stylesheet" type="text/css" href="resources/css/grid.css"> <!-- <x-compile> --> <!-- <x-bootstrap> --> <script type="text/javascript" src="extjs/ext-all.js"></script> <script type="text/javascript" src="build/bootstrap.js"></script> <!-- </x-bootstrap> --> <script type="text/javascript" src="app.js"></script> <!-- </x-compile> --> </head> <body></body> </html>
I've pasted the all-classes.js and the index.php file from the build folder to the root folder. The problem is when I run the application, thre are many 404 error like this:Code:InMyAppFolder>sencha compile -classpath=../extjs/src,../app page -in=../index.php -out=../build/index.php
It didn't find another files but I've just took these as example.- [COLOR=red !important]Uncaught Error: [Ext.Loader] Failed loading 'proxy/ajax.js', please verify that the file exists all-classes.js:10092[/COLOR]
- [COLOR=red !important]Uncaught Error: [Ext.Loader] Failed loading 'AM/model/myFile.js', please verify that the file exists ....[/COLOR]
AM is appName in app.js!Note that I've already specify the appFolder as app and put something like this in the all-classes.js. I think that it doesn't know how to map AM with app folder.Code:Ext.Loader.setPath ('AM', 'app');
I don't see another issues!Your help is welcome! 
Thanks in advance.
-
23 Jan 2013 4:52 AM #2
-
26 Jan 2013 4:41 PM #3
You did not mention if you are in a Cmd-generated app or not. If you are then try "sencha app build" instead as it contains a lot more than just the JS compile step.
If you are not in a Cmd-generated app and if you code does not fully specify it "requires" then it will probably help to tell the compiler which framework you are using (to enable its auto-dependency checks which are framework-specific). That switch should also automatically add the "src" folder to the classpath.
Not sure I am following all the ".." references you had in your original command - I am assuming you are running from one-level down from your app's root folder?Code:sencha -sdk=../extjs compile -classpath=../app page -in=../index.php -out=../build/index.php
Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
26 Jan 2013 4:42 PM #4
Also, there is an updated version available with some bug fixes - http://www.sencha.com/forum/showthre...-Now-Available
Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
27 Jan 2013 11:21 PM #5
Thanks for your reply!
That's right! I've run this command from my app folder:
- app
- extjs
- build (where generated files are stored =>all-classes.js, index.html)
- index.html
You think that it didn't recognize my extjs sdk? ... So I'll try your solution and keep you informed!
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote