Quantcast
Hmm doing blahblah = { some stuff} - WoWInterface
 
Thread Tools Display Modes
02-02-15, 03:14 AM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Hmm doing blahblah = { some stuff}

Okay so... can someone run me through what blahblah = { some stuff } is doing again? and if i local before blahblah it should technically localize it and work the same correct? the following causes taint because its in the global name space or at least I think thats whats going on.... Reason I am digging into it is because i noticed my glyph page is tainted for some reason. When i try to click on a glyph it says my addon has tryed to call a restricted function.

Code:
DefGMoveableFrames = {
			--Blizzard Frames
			['MiniMapLFGFrame'] = false,
			['ShardBarFrame'] = false,
			['QuestLogFrame'] = false,
			['FriendsFrame'] = false,
			['LFDParentFrame'] = false,
			['KnowledgeBaseFrame'] = true,
			['MerchantFrame'] = false,
			['MailFrame'] = false,
			['DressUpFrame'] = false,
			['TaxiFrame'] = false,
			['QuestLogFrame'] = false,
			['PaperDollFrame'] = true,
			['InspectFrame'] = false,
			['AchievementFrame'] = false,
			['AchievementFrameHeader'] = true,
			['AchievementFrameCategoriesContainer'] = 'AchievementFrame',
			['CalendarFrame'] = false,
			['ContainerFrame1'] = false,
			['ContainerFrame2'] = false,
			['ContainerFrame3'] = false,
			['ContainerFrame4'] = false,
			['ContainerFrame5'] = false,
			['Minimap'] = false,
			
			--GrimUI Frames
			['GrimUIPlayerFrame'] = false,
			['GrimUIPartyFrame1'] = false,
			['GrimUIPartyFrame2'] = false,
			['GrimUIPartyFrame3'] = false,
			['GrimUIPartyFrame4'] = false,
			['GrimExpBar'] = false,
			['GrimRepBar'] = false,
			['GUI_DevBar'] = false,
			['Audio_UI_Control'] = true,
			['GUI_AnchorPoint1'] = false,
			['GUI_AnchorPoint2'] = false,
			['GUI_AnchorPoint3'] = false,
			['GUI_AnchorPoint4'] = false,
			['GUI_AnchorPoint5'] = false,
			['GUI_AnchorPoint6'] = false,
			['GUI_AnchorPoint7'] = false,
			['GUI_AnchorPoint8'] = false,
			['GUI_AnchorPoint9'] = false,
			['GUI_AnchorPoint10'] = false,
			['GUI_AnchorPoint11'] = false,
}
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 02-02-15 at 04:04 AM.
  Reply With Quote
02-02-15, 03:21 AM   #2
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Also similar issue with my bindings code. It causes taint. Is there any way around this? the L infront of the "blahblah" portion is for translation. More or less I need to know if there is a way to do this that does not involve dumping it in the global space.
The LUA portion looks like this

Lua Code:
  1. BINDING_HEADER_GRIMUI = "----- GrimUI -----"
  2. BINDING_HEADER_WORLD_TARGET = L["World Target / Flares"]
  3. BINDING_HEADER_AUDIO_BINDING = L["Sound"]
  4. BINDING_NAME_AUDIO_BINDING_TEMPMUTE = L["Temporary Mute"]
  5. BINDING_NAME_AUDIO_BINDING_TOGGLEMUTE = L["Toggle Mute"]
  6.  
  7.  
  8. _G["BINDING_NAME_CLICK GUI_BlueFlare:LeftButton"] = L["Blue Flare"]
  9. _G["BINDING_NAME_CLICK GUI_GreenFlare:LeftButton"] = L["Green Flare"]
  10. _G["BINDING_NAME_CLICK GUI_PurpleFlare:LeftButton"] = L["Purple Flare"]
  11. _G["BINDING_NAME_CLICK GUI_RedFlare:LeftButton"] = L["Red Flare"]
  12. _G["BINDING_NAME_CLICK GUI_YellowFlare:LeftButton"] = L["Yellow Flare"]
  13. BINDING_NAME_CLEAR_WORLD_TARGETS = L["Clear all World Targets"]
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
02-02-15, 07:38 AM   #3
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
{ } creates a new table. Taint will not be introduced simply by virtue of a variable being global, but if that variable conflicts with another, it may be. I don't believe you can do binding labels in any other way, either. None of the code you posted should taint anything.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
02-02-15, 08:56 AM   #4
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Well I get glyph lock down from GrimUI with just GrimUI running. But get this.... if i remove all addons but GrimUI (DBM, Baggins, AshranBuddy, MSBT, Capping, umm one or two others) i get nothing in the taint log. Go figure. But with all addons running my addon appears to taint lots of things. All of which are things where it is putting something into the global space as apposed to being localized to that file or to the addon. Localizing it seems to drop it from the taint log but not everything in the list can be localized. Or maybe another way to go at this is... What could possibly cause the glyph frame to lock down? Originally I targeted my frame mover code and removed all of its interaction with the glyph frame but that did not stop it. I have no idea what i could have messed with that would have anything to do with the glyph frame. Ironically it is one of the few frames in the game i have not modified in some way. And No i did not mess with the two tabs attached to it either. lol.

Also just to clarify. Taint is what causes combat lockdown right? So somewhere some taint of some kind or another from one thing or another is responsible for the glyph lockdown correct? Or am I way off base? I just dont understand how My addon could be causing lockdown on the darn glyph frame....
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 02-02-15 at 10:25 AM.
  Reply With Quote
02-02-15, 11:02 AM   #5
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Combat lockdown generally refers to the inability [by addons] to perform certain actions during combat. Tainting refers to addons in some way disturbing the secure environment of the default UI, sometimes causing things to break. Unfortunately, it's been more or less concluded that the taint report system more often than not places the blame on innocent addons. If you, with all addons enabled, can reliably reproduce the glyph frame taint, and this does not happen with only your addon enabled, then it's probably safe to say that your addon is not to blame.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
02-02-15, 11:12 AM   #6
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
It does happen with only my addon enabled. The lockdown warning in game where it asks if you want to ignore or cancel? That happens just my addon or all addons. Whats interesting is that if i run JUST my addon then the taint log is empty even though i still get glyph frame lockdown
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
02-02-15, 02:16 PM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Lombra View Post
I don't believe you can do binding labels in any other way, either.
Yes, you can. See for example Bartender4's Bindings.xml file:
Code:
	<Binding name="CLICK BT4Button1:LeftButton" header="BT4BLANK1" category="Bartender4 "/>
	<Binding name="CLICK BT4Button2:LeftButton" category="Bartender4 "/>
	<Binding name="CLICK BT4Button3:LeftButton" category="Bartender4 "/>
	<Binding name="CLICK BT4Button4:LeftButton" category="Bartender4 "/>
	<Binding name="CLICK BT4Button5:LeftButton" category="Bartender4 "/>
	<Binding name="CLICK BT4Button6:LeftButton" category="Bartender4 "/>
However:

Originally Posted by Lombra View Post
None of the code you posted should taint anything.
This. Post the rest of your code. Also, the taint log is written in realtime, and gets wiped on /reload. Just open it and start looking as soon as you get the "action blocked" error, without reloading.
__________________
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
02-02-15, 03:10 PM   #8
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Originally Posted by Phanx View Post
Also, the taint log is written in realtime, and gets wiped on /reload. Just open it and start looking as soon as you get the "action blocked" error, without reloading.
Phanx - Long time no see Unfortunately GrimUI is an absolute beast and to post all relevant code would be out of control... I was unaware that taint logging was in real time and now that I know that im going to go back and test... i kept making it lockdown then reloading thinking a reload was necessary to write to the taint log. We shall see what I find out right now.

Hrrrm. So the taint log is staying blank even after the lockdown fires. are you sure its in real time? is the taint log called something or located someplace else while its live? Further testing and are you sure its live in real time?? it only ever changes with a reload.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 02-02-15 at 03:23 PM.
  Reply With Quote
02-02-15, 03:11 PM   #9
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
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.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Hmm doing blahblah = { some stuff}

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off