View Single Post
05/27/14, 04:08 PM   #21
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Originally Posted by Garkin View Post
I believe that event manager works the same way as callback object. It uses registry with structure similar to:
Lua Code:
  1. eventRegistry = {
  2.    [event1] = {
  3.       [identifier1] = callback1,
  4.       [identifier2] = callback2,
  5.    },
  6.    [event2] = {
  7.       [identifier1] = callback3,
  8.    },
  9. }
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).
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?
  Reply With Quote