Results 1 to 6 of 6

Thread: Direct with extjs 5 and node

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

    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
    Vote Rating
    3
      2  

    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
    8
    Vote Rating
    1
      0  

    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
    Vote Rating
    3
      0  

    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
    Vote Rating
    1
      0  

    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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,897
    Vote Rating
    1329
      0  

    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
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    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
  •