View Full Version : app-all.js contains all my code, but separate js files downloaded anyway...???
23 Nov 2011, 12:45 PM
app-all.js is generating cleanly, and appears to have all my minified .js code in it...but when I watch the app loading in firebug, after it has got app-all.js it then proceeds to request all the individual .js files.
23 Nov 2011, 1:05 PM
That means you don't have all your dependencies in the requires/uses properties in your Ext.define statements. Are they Ext JS classes? You still have to put them in those arrays too.
23 Nov 2011, 1:15 PM
I guess I don't really understand the process though.
23 Nov 2011, 1:22 PM
ext.js only contains the core of the framework. app-all.js should include your application files and the Ext JS classes you have said you need.
23 Nov 2011, 1:31 PM
My app-all.js does contain exactly that...my classes and the additional Ext JS classes...so still don't get why it needs to request all the source files.
23 Nov 2011, 1:33 PM
I can tell you the classes that are still being loaded aren't in your app-all.js or the jsb3 file.
24 Nov 2011, 6:08 AM
They appear to be...
I could send you a couple of screen shots...
One is a trace from firebug showing app-all.js being downloaded (313ms), and then my file AJAXCall.js being downloaded (156 ms)...
The other is a result of a search of app-all.js in Eclipse, which finds AJAXCall.js.
But maybe I am misinterpreting Firebug, and what appears to be a download is actually just a fetch from cache.
24 Nov 2011, 6:35 AM
No...I am not misinterpreting Firebug...a separate GET is being issued for all the source files...and HTTP 200 is being returned.
So there is something wrong with my code...Ext thinks it needs to download each of the source files even though it already has everything it needs.
Any tips would be appreciated!
24 Nov 2011, 9:52 AM
Trust me... that's what is going on... the classes aren't being required any where so SDK Tools aren't including them.
24 Nov 2011, 10:15 AM
You are right...I was seeing Ext.create's in app-all.js but thinking Ext.define...
In fact, as you say, the downloaded js files are NOT in app-all.js
So now I have to edit every class definition and add the list of all classes it depends on, in order to get the tool to include it in app-all.js ?
25 Nov 2011, 8:45 AM
Sencha Builder doesn't include class/files to jsb2 config which represent as xtype.
So you need to initialize them in requires field.
25 Nov 2011, 8:49 AM
For example, I use xtype: 'radiogroup' on my forms. That's why I have to initialize Ext.form.RadioGroup before.
Only after this actions sencha builder can include this class (and all its dependencies) to the config.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.