Results 1 to 2 of 2

Thread: How to specify the loader path

  1. #1
    Ext JS Premium Member
    Join Date
    Dec 2009
    Posts
    65
    Vote Rating
    4
      0  

    Default 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 - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Vote Rating
    257
      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 human resources manager: fabienne.bell@sencha.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •