FrameLocks.lua and target taint
So i have a taint issue. After going into a pet battle my target frame becomes tainted and any time i change targets in combat after a petbattle it fires taint errors. The problem is with the new FrameLocks.lua
my code hides and locks out the original bliz targetframe. This new framelocks.lua does this... Lua Code:
I think the taint is created because my addon cancels the orignal hide and show functions via Lua Code:
and this is the actual hiding of it... Lua Code:
Any ideas for turning the framelock.lua off? |
heres what the taint log produces... Chat frame 11? ummm my chat setup only goes to 8?
Code:
9/27 16:05:26.989 Execution tainted by GrimUI while reading ChatFrame11 - Interface\FrameXML\FloatingChatFrame.lua:1105 FCF_OnUpdate() |
Can someone point me to where the pet battle chatframe gets created? is that in chatframes? floatingchatframes? the petbattle ui?
|
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() Code:
TargetFrame:GetScript("OnLoad")(TargetFrame) 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. |
hmm well im not so sure anymore that the targetframe is the initial taint culprit anymore but on the target frame note.. Yes i had thought about dumping the events before and you may have noticed my note to myself in the code that i made months ago to come back and hide the target frame the way you posted but i have two things that rely on the original target frame still functioning... at least to some degree. The target castbar and buffs :(
i suppose my hope at this point should be that i can leave the events necessary for those to function right intact and ditch the event thats causing it to try to hide/show the original? maybe a simple unregister of the petbattle start and finish events on the target frame? hmm but is the target frame even looking for such events? It did not look like it when i was going through it earlier. |
Ignoring, for the moment, all of your current code and everything it does, what exactly do you actually want to do with the target frame?
|
Well... everything is redone on the target frame in grimui. Buffs are separated between what you cast and what other friendly units cast and separated again between buffs and debuffs. So on the GrimUI target frame the buffs appear either to the right or left of the center of the top of the frame and buffs/debuffs you cast appear higher and slightly larger on the screen. Then there is the 3d model... and all the art work... and all that jazz.
In order for the buff stuff to work right i had to use some of the current blizz functions and it requires the original targetframes events to still be intact. Because all i really did was rearrange blizzards own buff icons and then position them where they needed to be for my target frame. I did the same thing with the enemy cast bar. Also GrimUI gives the option to run both my window and the original window and allows the user to switch back and forth at will(out of combat of course... the options dont work at all in combat that would be silly). |
This is what the window looks like... its problem is when it hides in combat after a petbattle... before a petbattle works fine always has...
|
If you're not using the default target frame, why are you using the default target buff/debuff icons? Whatever addon you're using for your custom target frame should also be able to show buffs/debuffs, and likely a castbar. If not, there are plenty of standalone castbar addons that can show a target castbar, and writing a fully custom castbar isn't too hard.
What addon are you using for your custom target frame? |
Quote:
The problem is i was having trouble writing something for the buffs in fact i have problems any time it comes to buttons/icons. Like my threee problem areas are backpack space, buttons, and buffs lol. It was easier for me to adjust the blizz target buffs to my frame then anything else and until the pet battle stuff it worked fine. The cast bar i may be able to replicate I have not tried to yet... Side note: unregisterallevents on the blizz targetframe stops the taint... but i lose the buffs and the cast bar... |
See PhanxBuffs for a very simple example of creating buff/debuff icons that don't depend on any other addons or libraries, and don't depend on any parts of the default UI being visible.
|
All times are GMT -6. The time now is 09:51 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI