View Single Post
01/23/15, 08:27 PM   #1
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
EVENT_MANAGER:RegisterForUpdate

Questions about the Event Manager:

Does it matter if you re-register something for update (to change it), without unregistering the old one first?
Lua Code:
  1. -- Register something for update
  2. EVENT_MANAGER:RegisterForUpdate("Something", ...)
  3.  
  4. -- Re-register it to change it, without unregistering the old one
  5. EVENT_MANAGER:RegisterForUpdate("Something", ...)

Does it really matter if you try to UnregisterForUpdate if it isn't registered?
Lua Code:
  1. -- unregister it (maybe this is done in normal code somewhere & we know its registered
  2. EVENT_MANAGER:UnregisterForUpdate("Something")
  3.  
  4. -- But maybe in the settings menu we don't know if its registered, so unregister it just in case
  5. EVENT_MANAGER:UnregisterForUpdate("Something")

Is there some way to check to see if something is registered with the event manager?
Besides creating a variable myself to track whether or not you have "Something" registered for update?

Last edited by circonian : 01/28/15 at 09:16 PM.
  Reply With Quote