API GetFramesRegisteredForEvent

104,672pages on
this wiki
Add New Page
Talk0 Share
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.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki