Quantcast

Enabled frame unregistration

Author James Whitehead II <jnwhiteh@gmail.com>
Author date 2010-10-16 16:27:43
Author local date 2010-10-16 17:27:43 +0100
Committer James Whitehead II <jnwhiteh@gmail.com>
Committer date 2010-10-16 16:27:43
Committer local date 2010-10-16 17:27:43 +0100
Commit 7e91cea29fe5242f80eabb192bbded4f6b3a08f9
Tree 6bc835079a68fbbd23b7d0920355f962095f26d6
Parent 850d93466ca168004d224e27aeccce496d69b76d
Enabled frame unregistration

Addons that are registering using ClickCastFrames should run
ClickCastFrames[frame] = nil or ClickCastFrames[frame] = false.

Addons that are using the group header, and are registering using
the secure snippet method should do the following:

local header = self:GetFrameref("clickcast_header")
header:SetAttribute("clickcast_button", button)
header:RunAttribute("clickcast_unregister")

This code expect to be run on the header, but needs access to the
button. This can probably be passed into your header via a frame
reference, i.e:

MyGroupHeader:SetFrameRef("foo", MyGroupHeaderUnitButton1)
MyGroupHeader:Execute[[
  local button = self:GetFrameRef("foo");
  local header = self:GetFrameRef("clickcast_header")
  header:SetAttribute("clickcast_button", button)
  header:RunAttribute("clickcast_unregister")
]]