E Language Reference

Events

See Also

An event is a special type of function that may or may not be raised along with any other implementations of that specific signature and alias of event. Each event of the same name and signature is placed into a list based on the priorities (optionally specified, default is priority value is 5) of each implementation. When the event name is raised, all implementations are triggered in order of priority (highest being 0) using the same parameter values for each call. Events can include a conditional execution statement that may halt the execution of that implementation.

Events can also be registered for class types and are called when the event is raised with a class instance specified. These are procedural and do not interfere with the structure of classes allowing events to be registered for both script based classes and host classes without the classes needing any modification.

*** Note: Unlike normal functions, if no implementations of a raised event exists, no runtime error will occur. The raise call will simply skip to the next operation. The reason for this is to allow for a very dynamic event system.

This section explains events, raising them and how to declare them:

See Also