Originally Posted by LudiusMaximus
If nobody has an answer to this strange behaviour of AceEvent-3.0,
maybe someone can tell me how to let my code check itself if an event exists?
Thanks!
|
did you try if it works without using acevent which itself uses callbackhandler and that's propably why it doesn's work as you expect it?
Lua Code:
local f = CreateFrame("Frame");
local EventExists = function(event)
if (pcall(function() f:RegisterEvent(event); end)) then
f:UnregisterEvent(event);
return true;
end
end
print(EventExists("MEH"));
print(EventExists("PLAYER_LOGIN"));