31 Jan 2013 1:14 AM #11
After much tiral and error, I've found this command seems to do mostly what I want. The output is a new HTML file which references a script called 'all-classes.js' which contains all my JS code in one file.
sencha compile -classpath=app.js,app,sdk/src page -in=src.html -out=build.html
Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: widget.form
1 Feb 2013 8:41 AM #12
My thought is that perhaps we need to have the microloader intact in your src.html file.
1 Feb 2013 5:06 PM #13
This is an ExtJS 4.1 project, not a touch project. Is there an equivalent 'microloader' for ExtJS?
5 Feb 2013 1:02 PM #14
So ExtJS index file does have some special stuff
<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <title>fresh</title> <link rel="stylesheet" href=".res/default/app.css"> <!-- <x-compile> --> <!-- <x-bootstrap> --> <script src="ext/ext-dev.js"></script> <script src="bootstrap.js"></script> <!-- </x-bootstrap> --> <script src="app.js"></script> <!-- </x-compile> --> </head> <body></body> </html>Phil Strong
14 Feb 2013 8:12 PM #15
My bootstrap.js files only contains license information, no code, so I cannot see how this helps. The initial project created by Architect does not have the bootstrap.js file either.
Has anyone successfully used Sencha Cmd to deploy and run an Architect project?
14 Feb 2013 11:14 PM #16
After investigating the all-classes.js file, it seems that some classes are being defined before their dependencies.
which uses a form panel (widget.form) in it's config data, is above the line:
Any idea why this is happening?
15 Feb 2013 12:25 AM #17
I've been able to work around this using the requires list inside Architect. I didn't think this was supposed to be necessary?
However, I'm now getting a "Uncaught TypeError: Cannot call method 'on' of undefined" which I've tracked down to a store not being registered in the Ext.data.StoreManager.
I'm getting the impression that the sencha build tools are a bit immature when it comes to coping with larger projects, unless I'm doing something fundamentally wrong with my project.
15 Feb 2013 12:40 AM #18
It seems much of my problems are caused by checking the 'singleton' box for some of my views.
I uncheck this, and these errors go away. I'll need to rewrite some of my functions to work with this configuration, but at least I'm making progress here...
15 Feb 2013 1:13 AM #19
Woohoo I solved all the dependency issues, pages and stores are now loading.
However the built project only comes up with a blank screen. No errors or messages. Just blank. Of course, the source project does not do this.
I'd be super happy if someone could get me past this to a working build!
20 Feb 2013 8:37 AM #20
Have you tried the built project in Chrome/Safari/FF?
Is it white screen on device or browser?
Any errors in Chrome?Phil Strong