Results 1 to 6 of 6

Thread: Direct with extjs 5 and node

  1. #1
    Sencha Premium Member
    Join Date
    Sep 2013
    Posts
    9

    Default Direct with extjs 5 and node

    I have a problem with extjs 5 and Direct.
    The same sample work's in extjs4 but not in 5.

    when the /directapi return:

    Ext.ns("ExtRemote");ExtRemote.REMOTING_API={"url":"http://localhost:8888/direct","namespace":"ExtRemote","type":"remoting","actions":{"DXHello":[{"name":"wave","len":1}],"DXHello.js.bak":[{"name":"wave","len":1}],"DXHello2":[{"name":"wave","len":1}],"DXHello3":[{"name":"wave","len":1}]}}Ext.ns("ExtRemote");ExtRemote.REMOTING_API={"url":"http://localhost:8888/direct","namespace":"ExtRemote","type":"remoting","actions":{"DXHello":[{"name":"wave","len":1}],"DXHello.js.bak":[{"name":"wave","len":1}],"DXHello2":[{"name":"wave","len":1}],"DXHello3":[{"name":"wave","len":1}]}}


    and the console said:
    TypeError: Ext.ns is not a function

  2. #2
    Sencha - Services Team Stju's Avatar
    Join Date
    Dec 2008
    Location
    Redwood city, California
    Posts
    293

    Default

    There is an updated example provided in repository : https://github.com/jurisv/extdirect....lient/DemoExt5

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2013
    Posts
    9

    Question Ext.namespace is not a function

    Quote Originally Posted by Stju View Post
    There is an updated example provided in repository : https://github.com/jurisv/extdirect....lient/DemoExt5
    I am trying to use the updated example 2.0 in the repository with extjs 6.5 and I am getting a similair error Ext.namespace is not a function. I had an extjs 5.1.0 app working perfectly with direct and am in the process of upgrading it to 6.5. Please help.

  4. #4
    Sencha - Services Team Stju's Avatar
    Join Date
    Dec 2008
    Location
    Redwood city, California
    Posts
    293

    Default

    Sencha has released an example application based on my connector and provides the implementation that is using the latest version of Ext JS 6.5
    Here is the link: https://github.com/sencha-extjs-examples/Coworkee

  5. #5
    Sencha Premium User
    Join Date
    Jun 2009
    Posts
    2

    Default

    In case someone else finds this thread and wonders what is happening: you probably specified direct api.js before sencha-generated app.js: i.e.:

    {
    "path": "api.js",
    "remote": true
    },{
    "path": "app.js",
    "bundle": true
    },
    You simply need to rearrange it, so that api.js appears AFTER app.js.

  6. #6
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449

    Default

    Not like Ext.ns is even needed to be used. Should use this instead:

    Code:
    var ExtRemote = window.ExtRemote || (window.ExtRemote = {}); ExtRemote.REMOTING_API={...};
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

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
  •