-
8 Feb 2013 9:44 AM #1
[Sencha Cmd] sencha app build
[Sencha Cmd] sencha app build
Hi there,
recently I adapted my app to use Sencha Cmd.
As a result *sencha app build* executes successfully, but when I launch my code I get following error:
Error evaluating http://localhost/myapp/app.js with message: ReferenceError: GlobalVars is not defined localhost:80 G localhost:80 c localhost:81 b localhost:81 (anonymous function) localhost:84 E.b localhost:79 h.onreadystatechange localhost:78
Partial definition of GlobalVars:
Moreover if I get rid of 'alternateClassName' and update codes accordingly (GlobalVars => MyApp.utils.GlobalVars) I get following error instead:Code:Ext.define 'MyApp.utils.GlobalVars', extend: 'Ext.mixin.Observable' alternateClassName: 'GlobalVars' singleton: true config: # ...
Error evaluating http://localhost/myapp/app.js with message: TypeError: Cannot read property 'GlobalVars' of undefined localhost:80 G localhost:80
Application works fine even with microloader if I don't deploy built (by Sencha Cmd utility) production code, but I didn't adapt to Sencha Cmd without reason. I want my codes to be deployed concatenated into one, minified (app.js) source file.
Any help appreciated.
-
9 Feb 2013 1:30 AM #2
Best way to adapt an app to cmd
Best way to adapt an app to cmd
Hi, I once had to adapt all my apps to use cmd.
Here is how I did it:
Rename my app myApp into myApp-old
Run in terminal: sencha generate app myApp ../myApp
Then I copied the app dir content of myApp-old into myApp. (Don't include the index.html and the directories .sencha and touch)
Success
-
9 Feb 2013 4:10 AM #3
Indeed I did so, but that was not a case. In fact I'm developing in CoffeeScript instead of pure JS and generated code is not always the one, Sencha dependency analyzer dreams of. More over I have found, that concatanated code is more restrictable in the means of proper usage of ST. I made it semi working right now, but still couple of screens don't work yet.
Thanks for your help.
PS: Do you know how forum threads can be removed? Can't find any button for this anywhere.
-
9 Feb 2013 11:24 AM #4
Sorry. I don't know. I never removed a thread.
-
10 Feb 2013 4:04 AM #5


Reply With Quote