Use a secure function to handle the menu
Adrian L Lange [01-29-10 - 19:49]
Use a secure function to handle the menu
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index 2b36975..c7e1f3d 100644
--- a/oUF_P3lim.lua
+++ b/oUF_P3lim.lua
@@ -124,12 +124,9 @@ local function customFilter(icons, unit, icon, ...)
end
local function style(self, unit)
- self.colors = colors
- self.menu = menu
-
- self:RegisterForClicks('AnyUp')
- self:SetAttribute('type2', 'menu')
+ SecureUnitButton_OnLoad(self, unit, menu)
+ self.colors = colors
self:SetScript('OnEnter', UnitFrame_OnEnter)
self:SetScript('OnLeave', UnitFrame_OnLeave)