Wikia

WoWWiki

Watchlist Recent changes

Frame:UnregisterEvents

This is a user-defined function that you can copy and paste into your addon. Replace <PREFIX> with your AddOn's prefix to avoid conflicts between different versions of these functions.


Add this method to your frame to register multiple events.

Code Edit

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

Example Edit

local frame = YourEventFrame
frame.UnregisterEvents = UnregisterEvents

-- Tell the API to stop listen for 'VARIABLES_LOADED', 'ADDON_LOADED', and 'MERCHANT_SHOW'
frame:UnregisterEvents('VARIABLES_LOADED', 'ADDON_LOADED', 'MERCHANT_SHOW')

Or unregister events for a frame without attaching UnregisterEvents to the frame:

local frame = YourEventFrame

-- Tell the API to stop listen for 'VARIABLES_LOADED', 'ADDON_LOADED', and 'MERCHANT_SHOW'
UnregisterEvents(frame, 'VARIABLES_LOADED', 'ADDON_LOADED', 'MERCHANT_SHOW')

Pages on WoWWiki

94,154pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
55,612photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki