WoW API < GetFramesRegisteredForEvent

Returns all frames registered for "event", in the order they will actually receive it.

frame1, frame2, ... frameN = GetFramesRegisteredForEvent("event")

Parameters Edit

Arguments Edit

String - The event to check for. See Events A-Z (Full List) for the complete list of events.

Returns Edit

frame1, frame2, ... frameN
frame1, frame2, ... frameN
List - N number of frames. Best to pass the results to a vararg function for processing.

Details Edit

The first frame returned will be the first to receive the given event, and likewise the last returned will receive the event last. A frame can be moved to the end of this event list order by unregistering and then reregistering for the event.

Example Edit

local event = 'VARIABLES_LOADED'
local function VarargHandler ( ... )
    for i = 1, select( "#", ... ) do
        select( i, ... ):UnregisterEvent( event );
VarargHandler( GetFramesRegisteredForEvent(event) )

Result Edit

Unregisters the 'VARIABLES_LOADED' event from every frame listening for it at the time the code is executed. Seems kinda pointless, but it's just an example.

Community content is available under CC-BY-SA unless otherwise noted.