From 1b559df631a4f489a2ff1b191fa54469c0b1e8dd Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Fri, 22 Aug 2008 08:11:35 +0000 Subject: [PATCH] update to changes to the secure code --- actionBar/States.lua | 3 +-- buttonPrototypes/ActionButton.lua | 13 +++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/actionBar/States.lua b/actionBar/States.lua index 6699e25..d35ee49 100644 --- a/actionBar/States.lua +++ b/actionBar/States.lua @@ -128,8 +128,7 @@ function ActionBar:UpdateStates() self:SetAttribute("_onstate-page", [[ self:SetAttribute("state", newstate) - newBTState = newstate - return true + control:ChildUpdate("state", newstate) ]]) table_insert(statedriver, tostring(self:GetDefaultState() or 0)) diff --git a/buttonPrototypes/ActionButton.lua b/buttonPrototypes/ActionButton.lua index e2adace..b949037 100644 --- a/buttonPrototypes/ActionButton.lua +++ b/buttonPrototypes/ActionButton.lua @@ -92,15 +92,16 @@ function Bartender4.Button:Create(id, parent) --button:SetAttribute("hidestates", "-1") parent:SetAttribute('_adopt', button) - button:SetAttribute('_childupdate', [[ - local state = newBTState - self:SetAttribute("state", state) - local type = self:GetAttribute("type--" .. state) + button:SetAttribute('_childupdate-state', [[ + -- evil hack due to bug in the code + scriptid, message = message, scriptid + self:SetAttribute("state", message) + local type = self:GetAttribute("type--" .. message) if type == "macro" then - self:SetAttribute("macrotext", self:GetAttribute("macrotext--" .. state)) + self:SetAttribute("macrotext", self:GetAttribute("macrotext--" .. message)) end self:SetAttribute("type", type) - self:SetAttribute("action", self:GetAttribute("action--" .. state)) + self:SetAttribute("action", self:GetAttribute("action--" .. message)) ]]) button:RegisterForDrag("LeftButton", "RightButton")