03-13-2020, 01:15 PM
(This post was last modified: 03-13-2020, 05:18 PM by remkonoteboom.)
No problem. Just to further on this: javascript has full access to the API. This allows you to combine server side interaction with what occurs in the client side.
var server = TACTIC.get()
server.update(search_key, {...})
That is a simple example for single updates. We try to use promises whenever we can, which the api supports with any function prepended with "p_":
var server = TACTIC.get()
server.p_execute_cmd( cmd_class, kwargs)
.then( function(ret_val) {
... do some javascript
} )
catch( function(e) {
... handle some errors
} )
This will make asynchronous calls to the server and also catch and handle errors properly. Many of the API functions have promise equivalents.
var server = TACTIC.get()
server.update(search_key, {...})
That is a simple example for single updates. We try to use promises whenever we can, which the api supports with any function prepended with "p_":
var server = TACTIC.get()
server.p_execute_cmd( cmd_class, kwargs)
.then( function(ret_val) {
... do some javascript
} )
catch( function(e) {
... handle some errors
} )
This will make asynchronous calls to the server and also catch and handle errors properly. Many of the API functions have promise equivalents.