1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    139
    Vote Rating
    3
    jeanluca is on a distinguished road

      0  

    Default Unanswered: external stores do not work in production build

    Unanswered: external stores do not work in production build


    Hi

    I'm using a 'shared' folder (outside my project folder) with stores in it. However. when you do

    $> sencha app build production

    I get the following 404 in my browser:

    As you can see the path is completely wrong. Furthermore, in the generated app.js the store is present!

    This error can be reproduced to generate a default sencha app

    Code:
    $> sencha generate app --path path/to/MyProj
    Next, you need to add the shared folder to .sencha/app/app/sencha.cfg
    Code:
    app.name=defaultapp.framework=touch
    app.classpath=${app.dir}/app.js,${app.dir}/app,${app.dir}/../SHARED/src/
    Create a store inside the shared folder and define it in app.js like

    Code:
    //<debug>
    Ext.Loader.setPath({
        'Ext': 'touch/src',
        'Test': '../SHARED/src',
        'default': 'app'
    });
    //</debug>
    
    
    Ext.application({
        controllers: ["MyTest"],
        stores: ['Test.store.MyStore'],
    
    
        name: 'default',
    
    
        requires: [
            'Ext.MessageBox',
            'Test.store.MyStore'
        ],
        .......
    Thats it. I'm using 'Sencha Cmd v3.0.0.250' and the SDK is version 2.1.0

    Cheers

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Getting that 404 means it was not picked up during the build. If you remove it from the stores array, does that help at all?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Posts
    139
    Vote Rating
    3
    jeanluca is on a distinguished road

      0  

    Default


    If I remove it from app.js and require it in the controller it works!! However you cannot do (in the controller):

    Code:
    var store = Ext.getStore('MyStore')
    it will return 'undefined'
    But if I do

    Code:
    var store = Ext.create('Test.store.MyStore');
    I get the store.
    So, it seems that requiring/defining a store in app.js doesn't work. A bug ?

    I think this has worked in a previous version of the sencha touch tools!

    Cheers

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi