Links |
---|
Registers the frame for a specific event, triggering the OnEvent handler when the event occurs for the specified units.
Frame:RegisterUnitEvent(event, unit1 [, unit2])
The API function is available for any widget capable of having an OnEvent handler.
Arguments
- event
- string - name of the event, e.g. "UNIT_POWER".
- unit1
- string : UnitId - unit to deliver the event for.
- unit2
- string? : UnitId - second unit to deliver the event for.
Details
- A frame can only ever watch for events for two units using this mechanism. Repeated calls will overwrite old registrations.
- You must unregister the event in order to switch to or from an Frame:RegisterEvent registration for the same event. Otherwise, the RegisterEvent call is silently ignored, and the filters remain in effect.
Patch changes
Patch 5.0.4 (2012-08-28): Added.