From 12197ecf867d6197a5732d5d8f78efd0ee482616 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Thu, 14 Apr 2011 10:30:39 +0100 Subject: [PATCH] Move table creation before any script running --- Clique.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Clique.lua b/Clique.lua index d994f70..babd9c1 100755 --- a/Clique.lua +++ b/Clique.lua @@ -56,6 +56,17 @@ function addon:Initialize() self.header = CreateFrame("Frame", addonName .. "HeaderFrame", UIParent, "SecureHandlerBaseTemplate,SecureHandlerAttributeTemplate") ClickCastHeader = addon.header + -- Create a table within the addon header to store the frames + -- that are registered for click-casting + self.header:Execute([[ + ccframes = table.new() + ]]) + + -- Create a table within the addon header to store the frame bakcklist + self.header:Execute([[ + blacklist = table.new() + ]]) + self.header:SetAttribute("_onattributechanged", [[ if name == "hasunit" then if value == "false" and danglingButton then @@ -69,17 +80,6 @@ function addon:Initialize() -- Create a secure action button that can be used for 'hovercast' and 'global' self.globutton = CreateFrame("Button", addonName .. "SABButton", UIParent, "SecureActionButtonTemplate, SecureHandlerBaseTemplate") - -- Create a table within the addon header to store the frames - -- that are registered for click-casting - self.header:Execute([[ - ccframes = table.new() - ]]) - - -- Create a table within the addon header to store the frame bakcklist - self.header:Execute([[ - blacklist = table.new() - ]]) - -- This snippet is executed from the SecureHandlerEnterLeaveTemplate -- _onenter and _onleave attributes. The 'self' attribute will contain -- the unit frame itself. -- 1.7.9.5