View Single Post
05/27/14, 04:45 PM   #23
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by zgrssd View Post
It does not work this way. There is no identifier for your "Registered Callback" the same way you have to specify one for your Event Registering - you have (<Event>, <Callback>) instead of
(<ID of Event handler registation>, <Event>, <Callback>). Maybe RegsiterCallback returns some value (like an int index).
That was comment for event manager, callback manager has a slightly different structure of registry.
Lua Code:
  1. object.callbackRegistry = {
  2.    [eventName] = {
  3.       [1] = callback,
  4.       [2] = argument,
  5.       [3] = isDeleted
  6.    }
  7. }
Originally Posted by zgrssd View Post
Does anybody know how one could unregister a callback from a Callback Manager? Anything RegisterCallback Returns? Maybe you just give the callback again during unregister?
Lua Code:
  1. object:UnregisterCallback(eventName, callback)
  Reply With Quote