Command.Event.Attach

Attaches an event handler to an event.

Usage:

Command.Event.Attach(event, handler, label)
Command.Event.Attach(event, handler, label, priority)
ParameterTypeDatatypeDescription
eventparametereventGlobalA global event handle, usually pulled out of the "Event." hierarchy.
handlerparameterfunctionA global event handler function. This will be called when the event fires. The first parameter will be the standard global event handle, any other parameters will follow that.
labelparameterstringHuman-readable label used to identify the handler in error reports, performance reports, and for later detaching.
priorityparameternumberPriority of the event handler. Higher numbers trigger first.