PromiseBase::NEW (open)

Creates a new promise object

Syntax

LOADLIB "wh::promise.whlib";

MACRO NEW(FUNCTION PTR func)

Parameters

FUNCTION PTR func

Function that will receive the functions to resolve or reject the promise with. Signature: MACRO func(FUNCTION PTR resolve, FUNCTION PTR reject). Signature of the resolve function: MACRO resolve(VARIANT value). Signature of the reject function: MACRO reject(OBJECT exception).