PropertyHandle :: SetInstanceProcessHandler - Activate Instance process event handler
Instance process event handler can be used as an alternative way to handle instance database events within an instance (structure) context class. In contrast to database event handler functions in context classes, event handler can be installed in any application without defining specific context classes. This allows handling different instances with the one event handler.
When setting event handlers in addition to a context class handler function the context class handler is executed prior to the application handlers. When the context class handler returns an error ( YES ), the application handlers are not executed. Execution of application handlers is also stopped, when the first application handler returns an error ( YES ).
The event handler is passed as an event link that consists of an event handler function and a class instance. The handler is called later with the instance of the event handler class set in the event link.
When adding several instance process event handlers, they are called in the sequence as being added to the property handle. Handlers can be removed using the ResetInstanceProcessHandler () function.
Implementation details
- event_link
- Event link
An event link defines the link between a property handle and an event handler. A simple way of defining an event link is provided with the ELINK macro:
ELINK ( class_instance , class_name , function_name )