Lore archive · Warcraft Wiki, 2023 dump
Frame:RegisterEvents
Last wiki revision 2008-01-05
Add this method to your frame to register multiple events.
local function RegisterEvents(self, ...) for i=1,select('#', ...) do self:RegisterEvent(select(i, ...)) end end
-- Create an anonymous blank frame local frame = CreateFrame('Frame') frame.RegisterEvents = RegisterEvents -- Tell the API to listen for 'VARIABLES_LOADED', 'ADDON_LOADED', and 'MERCHANT_SHOW' frame:RegisterEvents('VARIABLES_LOADED', 'ADDON_LOADED', 'MERCHANT_SHOW')
Or register events for a frame without attaching RegisterEvents to the frame: -- Create an anonymous blank frame local frame = CreateFrame('Frame') -- Tell the API to listen for 'VARIABLES_LOADED', 'ADDON_LOADED', and 'MERCHANT_SHOW' RegisterEvents(frame, 'VARIABLES_LOADED', 'ADDON_LOADED', 'MERCHANT_SHOW')
Source
https://warcraft.wiki.gg/wiki/Frame:RegisterEvents · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.