Attaches an event handler to an event.
Layout:EventAttach(handle, callback, label) | |||
Layout:EventAttach(handle, callback, label, priority) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | function | A global event handler function. This will be called when the event fires. The first parameter will be the standard frame event handle, any other parameters will follow that. |
handle | parameter | eventFrame | A handle to a frame event, usually pulled out of the "Event.UI." hierarchy. |
label | parameter | string | Human-readable label used to identify the handler in error reports, performance reports, and for later detaching. |
priority | parameter | number | Priority of the event handler. Higher numbers trigger first. |