Quantcast WoWInterface - View Single Post - FrameLocks.lua and target taint
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.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote