Interesting, SDPhantom. Thank you.
I have to say that I'm not sure how to adapt my code based on what you found.
As a reminder, I use the following basic code for a button with a
macrotext attribute. It works fine on WoW 9.x:
Lua Code:
local frame = CreateFrame("Frame", "Test", UIParent, "SecureHandlerStateTemplate")
frame:SetSize(40, 40)
frame:SetPoint("TOPLEFT", UIParent, 10, -150)
local button = CreateFrame("Button", "TestBtn", frame, "SecureActionButtonTemplate")
button:ClearAllPoints()
button:SetSize(32, 32)
button:SetPoint("CENTER", frame)
local texture = button:CreateTexture("$parent_tex", "BACKGROUND")
texture:SetAllPoints(true)
texture:SetTexture(GetSpellTexture(783)) -- "Travel Form"
button.texture = texture
button:RegisterForClicks("LeftButtonUp", "RightButtonUp")
button:SetMouseClickEnabled(true)
button:SetAttribute("type", "macro")
button:SetAttribute("macrotext", "/abs")
------ testing purpose
button:SetScript("PostClick", function(self, arg1)
print("POSTCLICK: Clicked button=", self:GetName(), " macroTxt=", self:GetAttribute("macrotext"))
end)
end
Also, I believe the code you found concerns the
raid markers (placed on units) and not the
ground markers (placed on... the ground
).