Originally Posted by AlleyKat
or my way
Code:
local title, M = ...;
local frame = CreateFrame("Frame", title);
M[0] = frame[0];
setmetatable(M, { __index = getmetatable(frame).__index });
setmetatable(frame, { __index = M, __newindex = M });
|
This is incredibly overcomplicated and pointless... if you want your globally-accessible object to be a frame, just make it a frame, and don't use the private table. The private table is only there so that if you don't want a global, you don't need to make one just to share data between files in your addon.