PropertyHandle :: SetPropertyProcessHandler - Activate property process event handler
Property process event handlers can be used as an alternative for handling instance database events context class handlers. In contrast to database event handler functions in context classes, application event handler can be installed in any application without defining specific context classes. This allows handling different instances with 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 property process event handlers, they are called in the sequence as being added to the property handle. Handlers can be removed using the ResetPropertyProcessHandler() 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)