Re-designated SetTextColor() as a method of the private table.
James D. Callahan III [07-09-10 - 22:40]
Re-designated SetTextColor() as a method of the private table.
diff --git a/Frame.lua b/Frame.lua
index eb5512f..f28a509 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -149,7 +149,10 @@ local FilterValueMap -- Assigned in InitializeFrame()
-------------------------------------------------------------------------------
-- Upvalues
-------------------------------------------------------------------------------
+local SetTextColor = private.SetTextColor
+
local ListFrame
+local MainPanel
-------------------------------------------------------------------------------
-- Table cache mechanism
@@ -184,12 +187,6 @@ function addon:ClosePopups()
end
-------------------------------------------------------------------------------
--- Common to many functions throughout the file.
--------------------------------------------------------------------------------
-local function SetTextColor(color_code, text)
- return string.format("|cff%s%s|r", color_code or "ffffff", text)
-end
-
local FormatRecipeText
do
local SKILL_LEVEL_FORMAT = "[%d]"
diff --git a/core.lua b/core.lua
index 329ecc7..24011b9 100644
--- a/core.lua
+++ b/core.lua
@@ -144,6 +144,18 @@ if MissingLibraries() then
return
end
+-------------------------------------------------------------------------------
+-- Functions common to most files in the AddOn.
+-------------------------------------------------------------------------------
+function private.SetTextColor(color_code, text)
+ return string.format("|cff%s%s|r", color_code or "ffffff", text)
+end
+
+
+
+-------------------------------------------------------------------------------
+-- Debugger.
+-------------------------------------------------------------------------------
function addon:Debug(...)
if debugger then
debugger:AddMessage(string.format(...))