View Single Post
04-10-21, 05:31 AM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
AceEvent registers or unregisters Blizzard events; it does not process user-defined events. For that, you want Callbackhandler-1.0.

UnregisterAllEvents iterates through all possible Blizzard events and unregisters them from the frame. It does not matter if an event was actually registered or not. Internally, AceEvent will catch if an event was not registered. Therefore, you do not need to do that.

For example, if I write code and never register UNIT_HEALTH, UnregisterAllEvents will still check for UNIT_HEALTH, find it wasn't used, and ignore it.

If that isn't exactly the process, the other method AceEvent could be using is storing a table of events that really, truly, were registered on the frame, and iterates that table when you use UnregisterAllEvents. No matter which method is used, you are safe, and won't get errors.
  Reply With Quote