Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

IX-3497 - Getting issue details... STATUS

component.call{}

  • The interface is table in, anything out. Only the first returned argument is captured, so to return multiple values a table must be used.

  • the target component must be running

    -- this function is in the target component
    function doSomething(T) 
      return T.token .. " world", 1, {foo="bar"}
    end
    
    -- this function is in the caller component
    function makeRemoteCall()
      local CallData = {}
      CallData["token"] = "hello"
      local R, _num, _T  = component.call{id=”guid”, data=CallData, func=”doSomething”}
      trace(R)    -- "hello world"
      trace(_num) -- 1
      trace(_T)   -- {"foo":"bar"}
    end
  • No labels