IPB_Session interface:
TriggerEvent method
Description
Triggers a PowerBuilder event.
Syntax
TriggerEvent(pbobject obj, pbmethodID mid, PBCallInfo *ci)
Argument |
Description |
---|---|
obj |
The pbobject containing the method |
mid |
The pbMethodID returned by GetMethodID |
ci |
A pointer to a preallocated PBCallInfo structure |
Return Values
PBXRESULT. Returns PBX_OK for success, or one of the following for failure:
PBX_E_INVALID_ARGUMENT
PBX_E_INVOKE_METHOD_INACCESSABLE
PBX_E_INVOKE_WRONG_NUM_ARGS
PBX_E_INVOKE_REFARG_ERROR
PBX_E_INVOKE_METHOD_AMBIGUOUS
PBX_E_INVOKE_FAILURE
Examples
This code triggers the clicked event on a DataWindow object:
cls = session->GetClass(dwobj);
mid = session->GetMethodID
(cls, "clicked", PBRT_EVENT, "LIILCdwobject.");
session->InitCallInfo(cls, mid, ci);
session->TriggerEvent(dwobj, mid, ci);
...