1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    The Netherlands
    Posts
    39
    Vote Rating
    2
    zwikske is on a distinguished road

      0  

    Default How to deal with stores in another namespace

    How to deal with stores in another namespace


    Hello all,

    In our environment we're building an application that makes use of generic parts that can also be used in other apps. This varies from components to stores. These generic parts have been put in a separate namespace and are configured in the loader part for debugging and sencha.cfg for building using Sencha CMD.
    The loader part:
    Code:
    //<debug>
    Ext.Loader.setPath(
    {
        'zwik': '../shared/src',
        'Ext': '../touch/src',
        'Cm': 'app'
    });
    // </debug>
    sencha.cfg
    Code:
    app.name=Cm
    app.framework=touch
    app.shared = ${app.dir}/../shared/
    app.classpath=${app.dir}/app.js,${app.dir}/app,${app.shared}
    The problem we're having is that we are not able to create a working production build that makes use of shared stores in another namespace. During the actual build there are no errors and also no warnings when we compile with the shared/generic store. Though, when we launch the application that makes use of one of these shared stores we get a HTTP 404 error for the shared store we're using.

    When I investigate the production app.js generated by Sencha CMD I can find the shared/generic store in there. So why is the application looking for it somewhere else as well? .

    My question is, how should we deal with this? Is this even possible? I can get rid of the 404's by removing the stores from the store configuration in app.js but then the store events stop working. If I then put the stores in the requires section of the class that makes use of the store the events don't work.

    Other shared/generic items in other namespaces, such as components, work fine and don't cause any problems at all. Also when we're coding the build works fine. It's only the build part that seems to go wrong.

    We're using ST2.1 with Sencha CMD 3.0.0.250.

    Thanks!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,656
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Where are you requiring the store?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Location
    The Netherlands
    Posts
    39
    Vote Rating
    2
    zwikske is on a distinguished road

      0  

    Default


    I'm requiring the store in the app.js. I've also tried requiring in the class where we actually need the store but that didn't seem to help either