Quantcast

* Fixed an issue where frames were registering too early

James Whitehead II [01-02-07 - 01:10]
* Fixed an issue where frames were registering too early
Filename
Clique.lua
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()