Ext JS Premium Member
Problem with sencha create jsb using Ext Js 4 - classes missing in app.jsb3
We are having a problem with the sencha create jsb command for our project - we run the command against our application deployed on a server - the command runs without any issues but many of the required classes are missing from the app.jsb3.
Based on this I tried to run the command against the code downloaded for the Panda example for MVC Architecture and it seems to have the same issues - the only two classes included in the .jsb file are
I am using version 1.2.3 of the SenchaSDKTools on windows with version 4.0.7 of Ext js
I have seen it mentioned on the forum that the app.js file needs to be in the same folder as the index.html file (which it is not for the Panda example) I have tried to change this but it did not change the output.
Running the command with the verbose flag (-v) just prints out the .jsb file so this does not give us any additional information.
Facing similar issue, after long hours of debugging.. narrowed it to following
- When you declare your models / stores in app.js the Sencha Build tool doesnt include any other classes except for the single model /store.
If you move the declaration of your models / stores to your controllers the Sencha Build tool works fine, however for me when I do this the instance of store available in controller (via getXXXStore()) method is not usable (even though autoLoad is on)
Can somebody please help..
Sencha Create tool
Thanks Rajiv, You saved my day.
Originally Posted by rajivpa78
Glad it helped.
Few more findings
1. If your index.html has ext-all.js / ext-all-debug.js the resulting jsb3 will be empty. Make sure before the build index.html is switched to have ext.js or ext-debug.js
3. As reported earlier the store/model declaration should happen in controllers for build to work, however if you find that stores are not initialized when you are trying to populate your views from controller, then move your populate code to the on load event of store.
4. Once your build is successful and you include app-all.js + ext.js, you can see that still there are network calls made for few of the Ext framework classes. One work around is to include ext-all.js instead of ext.js to eliminate all such stray calls. That may come at cost of having redundant ext classes in ext-all.js & app-all.js.. but in our case the network time saved was worth it.
Ext JS Premium Member
Thanks rajivpa78 for posting this information. Very helpful!
Tags for this Thread