Hey.
I want to execute secure code (do a SetAttribute() on my own secure frame while In Combat) when the user clicks on a raid member on Blizzard's raid frames. The goal is to save on my secure frame the UnitID of the party/raid member that the user has targeted with his click.
My initial idea was to do something like:
Lua Code:
MyTestXD = CreateFrame("Button", "MyTestXD", nil, "SecureHandlerClickTemplate")
CompactRaidFrame1:SetFrameRef("Test", MyTestXD)
MyTestXD:WrapScript(CompactRaidFrame1, "PostClick", [[
local Test = self:GetFrameRef("Test")
Test:SetAttribute("UnitID", self:GetAttribute("unit"))
print("Unit targeted saved:", Test:GetAttribute("UnitID"))
]])
But trying it I have seen that CompactRaidFrames don't have SetFrameRef() method, so this approach is not possible.
Any ideas on how to do it?