We have begun migration of most wikis to our new host, Amazon Web Services. All but the top 100 wikis are in read-only mode until the migration is complete. Estimated completion: End of Week.

UnregisterEventFromAllFrames

From Wowpedia
Jump to: navigation, search
This is a user-defined function that you can copy and paste into your addon.

Globally unregister event.

Code

local function UnregisterEventFromAllFrames_helper(event, ...)
        for i=1,select('#', ...) do
                select(i, ...):UnregisterEvent(event)
        end
end

local function UnregisterEventFromAllFrames(event)
        UnregisterEventFromAllFrames_helper(event, GetFramesRegisteredForEvent(event))
end

Example

-- Globally unregister the event 'MERCHANT_SHOW'.
UnregisterEventFromAllFrames('MERCHANT_SHOW')