Skip to content

Instantly share code, notes, and snippets.

@tekkub
Created August 10, 2008 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tekkub/4710 to your computer and use it in GitHub Desktop.
Save tekkub/4710 to your computer and use it in GitHub Desktop.
local mainbtn = factory("tekPopbar"..actionID, driver, "ActionBarButtonTemplate,SecureHandlerEnterLeaveTemplate")
mainbtn:SetAttribute("_execute", [[buttons = newtable()]])
mainbtn:SetAttribute("_onenter", [[
self:SetAlpha(0.5)
for _,button in pairs(buttons) do button:Show() end
]])
mainbtn:SetAttribute("_onleave", [[
self:SetAlpha(1)
for _,button in pairs(buttons) do button:Hide() end
]])
-- ...
mainbtn:SetAttribute("_frame-kid", btn)
mainbtn:SetAttribute("_execute", "buttons["..bar.."] = self:GetAttribute('frameref-kid')")
Interface\FrameXML\RestrictedExecution.lua:582: Call failed: Interface\FrameXML\RestrictedExecution.lua:317: bad argument #1 to 'pairs' (table expected, got nil)
[C]: ?
[C]: ?
Interface\FrameXML\RestrictedExecution.lua:582: in function <Interface\FrameXML\RestrictedExecution.lua:574>
(tail call): ?
Interface\FrameXML\SecureHandlers.lua:86: in function <Interface\FrameXML\SecureHandlers.lua:76>
Interface\FrameXML\SecureHandlers.lua:113: in function `SecureHandler_OnSimpleEvent'
[string "*:OnEnter"]:3: in function <[string "*:OnEnter"]:1>
[C]: ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment