$ObjGetEvent
Documentation | Blog | Demos | Support
$ObjGetEvent
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Obtain the oldest event generated by a COM component.
Syntax
$ObjGetEvent (Object)
Parameters
Object | an object variable or formfield of type OLE |
Return Value
Returns a result as per the specification of the object.
Note: Zim attempts to convert to the assigned type. Ensure a proper variable type is assigned.
Comments
COM objects can generate synchronous or asynchronous events. In any case, they will be stacked up until removed by a $ObjGetEvent function invocation. Later, the parameters associated to this event can be queried using the $ObjEventParameter function.
Is up to the programmer’s responsibility to know whether the object raises events and what is the structure of these events.
Example
This example creates a component, runs a specific method and then queries the events by retrieving its parameters:
let vObject = $ObjCreate('MyObject.Anything') let vResponse = $ObjRunMethod(vObject, 'MyMethod', 'AParameter') let vResponse = $ObjGetEvent(vObject) if ($ObjEventName = 'MyEvent') out $objeventparameter(1) out $objeventparameter(2) else ... endif let vResponse = $ObjDestroy(vObject)
Warning
COM objects are being discontinued by Microsoft and may not be available in future releases of Zim-X.
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |