company logo

PropertyHandle :: SetPropertyEventHandler - Set Property Event Handler

Property event handlers can be used as an alternative way to handle server notifications independent on implemented context classes. To be notified from the server the property handle must be registered on the server (RegisterPropertyHandle()).

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 event handlers, they are called in the sequence as being added to the property handle. Handlers can be removed using the ResetPropertyEventHandler() function.

Implementation details

PropertyHandle  :: SetPropertyEventHandler ( EventLink *event_link )
  • 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)