1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    224
    Answers
    13
    Vote Rating
    9
    dedoz will become famous soon enough

      0  

    Default Answered: Sencha Cmd5 and Ext.Direct

    Answered: Sencha Cmd5 and Ext.Direct


    in Extjs4 without cmd, i used to put this Ext.Direct line before my app.js
    Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);

    Now with Sencha Cmd 5 and ExtJs5, where should i place that line ?
    i created a direct_api.js (with that line) and added to my app.json

    direct_api.js
    Code:
    Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
    app.json
    Code:
     "js": [
            {
                "path": "direct_api.js"
            },
            {
                "path": "app.js",
                "bundle": true
            }
        ],
    and error says Ext.direct is not defined.
    Seems like Ext.direct will only be loaded on my app.js ????
    so where i add that Ext.direct provider ?

  2. solved with

    Code:
    Ext.define('DemoExtJs.Application', {
        name: 'DemoExtJs',
    
    
        requires:[
            'DemoExtJs.DirectAPI'
        ],
    from
    https://github.com/jurisv/extdirect....Application.js

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Answers
    3549
    Vote Rating
    850
    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


    You say you used to put that before your app.js? You should have and should now place it in the launch method of Ext.application (or in app/Application.js)
    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.

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    224
    Answers
    13
    Vote Rating
    9
    dedoz will become famous soon enough

      0  

    Default


    solved with

    Code:
    Ext.define('DemoExtJs.Application', {
        name: 'DemoExtJs',
    
    
        requires:[
            'DemoExtJs.DirectAPI'
        ],
    from
    https://github.com/jurisv/extdirect....Application.js

Thread Participants: 1