Thread: Global vars ?
View Single Post
11-02-14, 01:41 AM   #10
Voyager
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 22
Originally Posted by AlleyKat View Post
Code:
local title, M = ...;

M:RegisterEvent(event, function(self, ...)
-- ...
-- where self ~= M, but self[key] == M[key]
end);
my build-in table now acting like frame
and frame with addon's name tag now acting like build-in table, that acting like frame
Couldn't one just do the following?
Code:
local title, M = ...;
M = CreateFrame("Frame", title);

M:RegisterEvent(event, function(self, ...)
-- ...
-- where self == M and self[key] == M[key]
end);
  Reply With Quote