1. #1
    Ext JS Premium Member
    Join Date
    Sep 2011
    Posts
    1
    Vote Rating
    0
    nonie is on a distinguished road

      0  

    Default Problem with sencha create jsb using Ext Js 4 - classes missing in app.jsb3

    Problem with sencha create jsb using Ext Js 4 - classes missing in app.jsb3


    Hi,

    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

    {
    "path": "app/model/",
    "name": "Station.js"
    },
    {
    "path": "app/store/",
    "name": "Stations.js"
    }





    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.

    Thanks,

    Ronan

  2. #2
    Sencha User
    Join Date
    Jan 2012
    Posts
    4
    Vote Rating
    0
    rajivpa78 is on a distinguished road

      0  

    Default


    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..

    Thanks
    Rajiv

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    1
    Vote Rating
    0
    rbail2000 is on a distinguished road

      0  

    Smile Sencha Create tool

    Sencha Create tool


    Thanks Rajiv, You saved my day.

    regards
    Ravi
    Quote Originally Posted by rajivpa78 View Post
    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..

    Thanks
    Rajiv

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    4
    Vote Rating
    0
    rajivpa78 is on a distinguished road

      0  

    Default


    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

    2. If the generated app-all.js is not compressed, its because Sencha build tool doesnt like stray commas within your source code. Review your source code to make sure there is no comma after the last element of array, no comma after the last variable in an object etc.. in general try to eliminate all the warnings reported by IDE ( eclipse with javascript validations enabled in our case)

    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.

  5. #5
    Ext JS Premium Member boofman15's Avatar
    Join Date
    Nov 2011
    Location
    Atlanta, GA
    Posts
    20
    Vote Rating
    0
    boofman15 is on a distinguished road

      0  

    Default Thanks....

    Thanks....


    Thanks rajivpa78 for posting this information. Very helpful!