Originally Posted by Everglow
1. How can I store global frames in a table in such a way as to run its methods?
|
it would be simply
Code:
local frames = {}
for i = 1,7 do
frames[i] = getglobal("ChatFrame"..i)
end
or
Code:
local frames = {}
local g = getfenv(0)
for i = 1, 7 do
frames[i] = g["ChatFrame"..i]
end
I think the second method is moderately faster.
Then to say hide the frame do.
or to hide all of them
Code:
for i,v in ipairs(frames) do
v:Hide()
end
2. Is there a way to copy a method to a local using the global environment?
http://www.wowwiki.com/index.php?tit...pt&action=edit
:GetScript("handle")