Results 1 to 6 of 6

Thread: Ext.Loader and CMD

  1. #1

    Default Ext.Loader and CMD

    I've configured Ext.loader in my Application.js, though CMD doesn't seem to understand this configuration:
        enabled : true,
        //disableCaching: false,  
        paths : {
            'Ext.ux.callout' : 'app/ux/callout',
            'Ext.ux.container' : 'app/ux/container',
            'Ext.ux.toggleslide' : 'app/ux/toggleslide',
            '': 'app/ux/tab',
            'Ext.ux.form.MultiSelect' : 'app/ux/form/MultiSelect.js',
            '' : 'app/ux/menu/StoreMenu.js',
            '': 'app/data/SimpleStore.js'
    Ext.Loader.setPath('MyApp', '.');
    as I get a NotFound error
    [ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency :
    This is all Ext 4.2, CMD 5.

    Is there a better way to use the Ext.Loader with a CMD app?

  2. #2
    Sencha - Engineering israelroldan's Avatar
    Join Date
    Nov 2011
    The Netherlands


    The loader configuration is ignored when performing a build. You need to add your app/data/SimpleStore.js to the classpath. Avoiding using the Ext namespace is also a good practice
    Israel Roldán | Senior Software Engineer (Framework tools)

  3. #3


    Thanks for the response. Can you expand a bit? Would you recommend not using the Ext.Loader at all? When adding to the classpath, use the "JS" array in app.json, correct?

  4. #4
    Sencha Premium Member
    Join Date
    Dec 2011

    Default Appending to the classpath for CMD builds

    My understanding is that the classpath is a CMD configuration i.e. you set it in a sencha.cfg file (either the one under YourApp/.sencha or the workspace configuration under YourWorkspace/.sencha/workspace/sencha.cfg.

    I use the "sencha app watch" web server to serve my dev version of the app and in this mode it appears the Ext.Loader is ignored. So, yes, I think you can ditch the loader if you are doing development in this mode. Otherwise it seems you will have to duplicate the path configurations in the sencha.cfg (for CMD builds) and in Ext.Loader path config (for development).

  5. #5


    Why would you use the classpath versus adding the classes to a 'requires' or as an included JS reference (index.html/app.json JS array)?

  6. #6
    Sencha Premium Member
    Join Date
    Dec 2011


    I think requires only finds classes that are in the class path (by default the sdk directory and your application directory). The modules I'm using are outside the default path. As for using app.json, yes that would work but AFAIK that lets you specify individual files, not a whole directory to add to the path.

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