WoWInterface - View Single Post - Hmm doing blahblah = { some stuff}
View Single Post
02-02-15, 05:58 PM   #15
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Lombra View Post
Right, seems to work for categories, but not for the other stuff I think.
No, it works fine for everything. Look at the example I posted from BT4. It's defining actual bindings that way, not categories.

Originally Posted by Lombra View Post
I'm guessing the taint log works like the combat log in that it gets written to only once it has a certain amount of text to write.
This would be my guess as well, and the buffer size probably depends on your hardware. At level 2 it writes pretty much continuously to the file on my machine.

Originally Posted by Lombra View Post
You should not use taint log level 2 I think. It prints a looot of stuff. Use level 1 instead.
Yes, but you need all that stuff. Level 1 is only useful for finding glaringly obvious stuff like "oh you overwrote the Show method on an action button" if that.

Originally Posted by Grimsin View Post
on a side note.... is it not a good idea though to go through and get as much stuff out of the global space as possible? After seeing everything that is in it i see a lot of clean up if that idea is true.
Yes. If it's not one of these things, it probably should not be global:
  • saved variables
  • your main addon object (for in-game debugging and third-party access)
  • top-level display frames (for identification with /fstack)
  • frames or other widgets that inherits from a Blizzard template that requires a name
  • names for bindings and headers that were declared in a Bindings.xml file
  • templates defined in XML

And anything that is a global should have a name that is unique and identifies it as belong it to your addon. A global variable named "x" or "_" for example will probably break everything.

Also, "global variable X tainted by Y" generally just means that Y created the global variable X. Everything created or touched by an addon is tainted by default, unless it's a secure frame created and managed using "safe" secure templates and methods.

What you want to look for in the taint log is the "action blocked" error. Then work your way backwards through the log looking at every entry that mentions the same object/function/variable to find out where it got tainted.
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