From 572d933a4e1e98e69fc0b23a08ce2ce27653f8f4 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Tue, 2 Jan 2007 01:10:52 +0000 Subject: [PATCH] * Fixed an issue where frames were registering too early --- Clique.lua | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/Clique.lua b/Clique.lua index 9071b1e..240cf5d 100644 --- a/Clique.lua +++ b/Clique.lua @@ -8,23 +8,6 @@ DongleStub("Dongle"):New("Clique", Clique) local L = Clique.Locals -function Clique:Initialize() - ClickCastFrames = ClickCastFrames or {} - self.ccframes = ClickCastFrames - - local newindex = function(t,k,v) - if v == nil then - Clique:UnregisterFrame(k) - rawset(self.ccframes, k, nil) - else - Clique:RegisterFrame(k) - rawset(self.ccframes, k, v) - end - end - - ClickCastFrames = setmetatable({}, {__newindex=newindex}) -end - function Clique:Enable() -- Grab the localisation header L = Clique.Locals @@ -49,6 +32,21 @@ function Clique:Enable() self.editSet = self.clicksets[L.CLICKSET_DEFAULT] + ClickCastFrames = ClickCastFrames or {} + self.ccframes = ClickCastFrames + + local newindex = function(t,k,v) + if v == nil then + Clique:UnregisterFrame(k) + rawset(self.ccframes, k, nil) + else + Clique:RegisterFrame(k) + rawset(self.ccframes, k, v) + end + end + + ClickCastFrames = setmetatable({}, {__newindex=newindex}) + Clique:OptionsOnLoad() Clique:EnableFrames() -- 1.7.9.5