View Single Post
04-11-16, 07:58 AM   #1
Folji
A Flamescale Wyrmkin
 
Folji's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 136
How can I do this without causing a taint?

Hiya!

So I've managed to get the bottom action bars working like this.



But, unfortunately, it's causing combat taints. Any changes to the bars and it gets blocked, which is a huge problem whenever exiting a vehicle while still in combat.

The frame hierarchy pretty much goes like this:

Code:
MultiBarHolder
	MultiBarLeft
		MultiBarBottomLeftButton1..12
	MultiBarRight
		MultiBarBottomRightButton1..12
So essentially I've got a holder frame containing two frames, anchored to the left and right respectively of the holder frame. And then those two frames contain the bottom left and bottom right action buttons respectively. I have a single handler function that handles everything on that bottom bar; the action bars, the xp/rep bars, all of it. And it runs whenever a related event fires (visibility of the action bars, faction watch status, XP update, etc.) with no real issue. Except for this part here;

Lua Code:
  1. if VisibleLeft and VisibleRight then
  2.     ns.MultiBarHolder:SetHeight(40)
  3.     ns.MultiBarHolder:SetWidth((458*2))
  4. elseif VisibleLeft or VisibleRight then
  5.     ns.MultiBarHolder:SetHeight(40)
  6.     ns.MultiBarHolder:SetWidth(460)
  7. else
  8.     ns.MultiBarHolder:SetHeight(1)
  9.     ns.MultiBarHolder:SetWidth(460)
  10. end

I'm not even touching the action bars, or the frames they're sitting on. I'm changing the height and width of the holder frame it's all anchored to, and for some reason that causes the code to freak out. I tried to log the taint, and this section was the culprit, every single time. So I'm guessing that I need to handle this frame's sizing securely somehow?
  Reply With Quote