1. #1
    Ext JS Premium Member
    Join Date
    Dec 2009
    Posts
    65
    Vote Rating
    3
    oklymenko is on a distinguished road

      0  

    Default How to specify the loader path

    How to specify the loader path


    Hello,

    I am building my application using 'sencha compile'. How can I tell it that e.g. the class with name MyNamespace.ClassName is in the myNamespace folder. Note the lowercase 'm' in the folder name.

    In Application.js, I can do it using Ext.Loader.setConfig, e.g.

    Code:
        Ext.Loader.setConfig({
            enable: true
            paths: {
                'MyNamespace': 'myNamespace'
            }
        });
    Thanks,
    Alex.

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,470
    Vote Rating
    202
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    In the {appFolder}/.sencha/app/sencha.cfg file you can specify the path used in the production build. If the myNamespace folder is under the 'app' folder then you shouldn't need to set this explicitly, but if it's outside of the 'app' folder you'll need to edit the classPath:
    app.classpath=${app.dir}/app,${app.dir}/astCommon,${app.dir}/app.js
    would become
    app.classpath=${app.dir}/app,${app.dir}/myNamespace,${app.dir}/astCommon,${app.dir}/app.js

    ... with the myNamespace path being the path to the folder - in this example it's a peer folder to 'app'
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

Thread Participants: 1

Tags for this Thread