Method ActiveXObject():comDefaultHandler() Foundation
Default handler for processing COM/ActiveX events.
:comDefaultHandler( <nDISPID>, [<param1>, ... ] ) --> xReturn
This method returns the value returned by the method handling the event passed. If :comDefaultHandler() cannot find a method for handling the event identified by parameter <nDISPID>, return is the object executing the method (self).
The method :comDefaultHandler() is the default event handler of an ActiveXObject instance. Whenever the ActiveX object connected fires an event to be processed by the Xbase++ application, :comDefaultHandler() is called with the event's dispatch ID (DISPID) and event parameters. The default event handling implemented in method :comDefaultHandler() performs the following actions:
Check whether the event generated is suspended. If so, the event is simply ignored. An application can suspend processing for COM/ActiveX events using method :suspendEvent().
Determine the human-readable name of the event generated using type library information of the COM/ActiveX component connected.
Check whether the ActiveXObject's class implements a method of the same name as the COM/ActiveX event. If so, this method is assumed to be an event callback method for the event generated. If such a method is found, :comDefaultHandler() calls it using the following call profile:
Internally, a COM/ActiveX component uses a protocol defined by the Common Object Model (COM) to communicate with the ActiveXObject instance it is connected to. The internal notification mechanism is based on calls to the generic method :invoke(), which operates based on so-called dispatch ids (DISPIDs). A DISPID uniquely identifies a property or method defined by a COM/ActiveX component. When an event is fired by a COM/ActiveX component, it notifies the application by calling method :invoke() of an internal dispatch interface, passing it the dispatch identifier (DISPID) of the event in question. Instances of the ActiveXObject class pass on the event notification to the default event processor, :comDefaultHandler().
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.