CreateDeferredPromise (open)

Creates a promise together with functions to manually resolve or reject it

Syntax

LOADLIB "wh::promise.whlib";

RECORD FUNCTION CreateDeferredPromise()

Return value

RECORD

A promise and functions to resolve or reject it.

OBJECT promise
Possible objecttypes:

Promise

FUNCTION PTR reject

Function to resolve the promise. Signature: MACRO reject(OBJECT rejectexception)

FUNCTION PTR resolve

Function to resolve the promise. Signature: MACRO resolve(VARIANT resolvevalue)