View Single Post
09-27-12, 09:34 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The problem in your original post is that you are replacing the Show and Hide methods on the frame; this taints the secure frame. If you want to hide the target frame without tainting it, you need to do it without overwriting anything on it. Try this instead:

Hide:
Code:
	TargetFrame:UnregisterAllEvents()
	TargetFrame:Hide()
Show:
Code:
	TargetFrame:GetScript("OnLoad")(TargetFrame)
Note that these must be run out of combat.

If you want to "hide" the frame based on certain conditions, you can either use a secure state driver that shows or hides the frame based on macro conditionals, or you can change the opacity of the frame to 0% to visually hide it if you want to "hide" it based on conditions that aren't allowed in macros like health.

Without seeing the whole file (what you posted is obviously not it, since there are tons of functions and variables used in the code you posted that are not defined in the code you posted), that's about as specific as I can get.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote