View Single Post
10/09/22, 12:12 PM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,024
The callback is the function called as you do something. At a keybind there is only one callback for "pressing the keybind".
At a dialog there could be a cancelCallback if you cancel the dialog and the other callback is for each dialog button (e.g. yes, no, etc.).
Event got a callback function too as the event fires, e.g. you loot an item -> register event to INVENTORY_SINGLE_SLOT_UPDATE -> your callback func registered for that event is called. Same for your starter event of the addon: EVENT_ADD_ON_LOADED -> your registered callback func fires -> your check if it was your addon that was loaded -> unregister the event callback again and call the needed code for your addon.
  Reply With Quote