Moved resetFilters() from the addon object to the private namespace table.
James D. Callahan III [06-30-10 - 23:08]
Moved resetFilters() from the addon object to the private namespace table.
diff --git a/Config.lua b/Config.lua
index c7550d7..0afe248 100644
--- a/Config.lua
+++ b/Config.lua
@@ -25,6 +25,9 @@ local AceConfig = LibStub("AceConfig-3.0")
local AceConfigReg = LibStub("AceConfigRegistry-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
+-- Set up the private intra-file namespace.
+local private = select(2, ...)
+
local modularOptions = {}
local function giveProfiles()
@@ -111,7 +114,7 @@ local function fullOptions()
name = L["Reset All Filters"],
desc = L["RESET_DESC"],
func = function(info)
- addon.resetFilters()
+ private.resetFilters()
end,
},
spacer1 = {
diff --git a/Frame.lua b/Frame.lua
index b7ab0f8..4d4ae84 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -1959,7 +1959,7 @@ do
end
end
- function addon.resetFilters()
+ function private.resetFilters()
local filterdb = addon.db.profile.filters
-- Reset all filters to true.
@@ -1983,7 +1983,7 @@ do
ListFrame:Update(nil, false)
end
end
- MainPanel.filter_reset:SetScript("OnClick", addon.resetFilters)
+ MainPanel.filter_reset:SetScript("OnClick", private.resetFilters)
end -- do
-------------------------------------------------------------------------------