613-518-1166 info@zimdatabases.com

ZIM Language Reference

$ObjGetEvent

< All Topics

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)

 

 

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents