View Single Post
05-03-08, 12:57 PM   #6
Everglow
An Aku'mai Servant
 
Everglow's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 36
Thanks for the pointers, Slakah!

I've been looking at the global environment as an option, but hadn't tried implementing it yet (still learning the ins and outs of Lua)

In any case, I only want to hide the frames while in combat. I need to be able to switch out their OnShow, and run their IsShown, Show, and Hide functions so my questions are:

1. How can I store global frames in a table in such a way as to run its methods?
-- that is what I was trying to do in my code sample
2. Is there a way to copy a method to a local using the global environment?

or can I simply use
Code:
function ORIG_OnShow = g["ChatFrame"..i].OnShow
to save it and
Code:
g["ChatFrame"..i]:OnShow()
to run it?
__________________
Everglow - Sisters of Elune/US

Last edited by Everglow : 05-03-08 at 01:16 PM. Reason: add info
  Reply With Quote