Command.Event.Detach

Detaches an event handler from an event. Any parameter can be 'nil', and this is interpreted as a wildcard. If multiple events match the constraints, only one will be detached.

Usage:

Command.Event.Detach(event, handler)
Command.Event.Detach(event, handler, label)
Command.Event.Detach(event, handler, label, priority)
Command.Event.Detach(event, handler, label, priority, owner)
ParameterTypeDatatypeDescription
eventparametereventGlobalA global event handle, usually pulled out of the "Event." hierarchy.
handlerparameterfunction/nilA 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.
labelparameterstring/nilHuman-readable label used to identify the handler in error reports, performance reports, and for later detaching.
ownerparameterstring/nilOwner to search for.
priorityparameternumber/nilPriority of the event handler. Higher numbers trigger first.