View Single Post
10-23-15, 02:41 PM   #7
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by LanceDH View Post
It's not the best way to do things, but I have the 2main frames not work during combat and hide once you enter combat.
The other ones are (in theory) impossible to trigger without either of those 2 frames being shown.
I used UnitAffectingCombat("player") for it though. Achieves the same thing but might look into using the function you gave instead.
As for taint log, totally forgot that was a thing.
However, I managed to get one when I clicked ILW_SpellBookTab (button in spellbook) TWICE, not once, but twice, on first click I saw a warning from your addon in my chat, however, on second one I've got a taint (line #491, inside ToggleUnlockedPage function).

Code:
'ILW_UnlockContainer:Hide()'.
!BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
[C]:: in function 'Hide'
ILearnedWhat\ILearnedWhat-6.2b1.lua:491: in function <ILearnedWhat\ILearnedWhat.lua:486>
ILearnedWhat\ILearnedWhat-6.2b1.lua:504: in function <ILearnedWhat\ILearnedWhat.lua:503>

Originally Posted by LanceDH View Post
Seems WoW just instantly taints any global variable in addons.
But as far as I understand my functions need to be global to call them in my XML code?
Or is there some other way to do this.
Well, write it in pure Lua, safest approach possible.

One more thing. Their API is almost always safe, there are some exceptions though, but NEVER (almost never tbh, there are few exceptions too) use functions blizz implemented in Lua themselves, it almost always causes taints. Your taint you were talking about in OP was caused by usage of blizz' SpellBookSkillLineTab_* functions.

P.S. BTW, sorry, completely missed the point in my first comment, was a bit tired. Went full retard, realized it just now after a short nap,
__________________

Last edited by lightspark : 10-23-15 at 02:49 PM.
  Reply With Quote