From c35a0c6d9a9048108b44db8ae3ef640e58e50da4 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Wed, 2 Jun 2010 00:36:48 -0400 Subject: [PATCH] Commented out addon:TRADE_SKILL_UPDATE() and the corresponding updater frame - not only does the event fire for others (without saying who it fires for), but calling addon:Scan() results in it firing, which calls addon:Scan() a second time. --- ARL.lua | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/ARL.lua b/ARL.lua index 727c919..4a61cfd 100644 --- a/ARL.lua +++ b/ARL.lua @@ -788,29 +788,33 @@ function addon:TRADE_SKILL_CLOSE() end do - local last_update = 0 - local updater = CreateFrame("Frame", nil, UIParent) - - updater:Hide() - updater:SetScript("OnUpdate", - function(self, elapsed) - last_update = last_update + elapsed - - if last_update >= 0.5 then - addon:Scan(false, true) - self:Hide() - end - end) - - function addon:TRADE_SKILL_UPDATE() - if not self.Frame:IsVisible() then - return - end - - if not updater:IsVisible() then - last_update = 0 - updater:Show() - end + -- local last_update = 0 + -- local updater = CreateFrame("Frame", nil, UIParent) + + -- updater:Hide() + -- updater:SetScript("OnUpdate", + -- function(self, elapsed) + -- last_update = last_update + elapsed + + -- addon:Debug("Running the updater's OnUpdate") + -- if last_update >= 0.5 then + -- addon:Scan(false, true) + -- self:Hide() + -- end + -- end) + + function addon:TRADE_SKILL_UPDATE(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) + -- if not self.Frame:IsVisible() then + -- return + -- end + + -- addon:Debug("Args are: %s, %s, %s, %s, %s, %s, %s, %s, %s, %s", tostring(arg1), tostring(arg2), tostring(arg3), tostring(arg4), + -- tostring(arg5), tostring(arg6), tostring(arg7), tostring(arg8), tostring(arg9), tostring(arg10)) + + -- if not updater:IsVisible() then + -- last_update = 0 + -- updater:Show() + -- end end end -- 1.7.9.5