getCallbackDataCount
Returns the number of pending Cordova plugin results.
Syntax
ui.Interface.frontCall("cordova", "getCallbackDataCount",
[], [count])
- count - Holds the number of pending results.
Usage
When initiating an asynchronous Cordova plugin front call with callWithoutWaiting
,
results are stored in the result queue when the Cordova function terminates, and a
cordovacallback
action is fired if the current dialog defines a corresponding
ON ACTION
handler.
The getCallbackDataCount
front call returns the number of results currently in
the result queue, for all asynchronous Cordova plugin front calls initiated by a callWithoutWaiting
.
It is then possible to implement a FOR
loop to retrieve all results with the
getCallbackData
front call.
In case of an error, the front call raises a runtime error -6333 that can be
caught with
TRY/CATCH
or WHENEVER ERROR
.Note: Use the
err_get()
function, to identify the reason of the error. For more details about
front call error handling, see ui.Interface.frontCall()
.Example
DEFINE cnt SMALLINT
CALL ui.Interface.frontCall("cordova", "getCallbackDataCount",
[], [cnt])