None of my secure buttons with macrotext attribute are working on PTR 10.x
In the main XML file (MyAddon.xml):
Code:
<Frame name="npcm_frameMain" frameStrata="BACKGROUND" virtual="false" hidden="true" resizable="true" parent="UIParent" inherits="SecureHandlerStateTemplate">
In the main lua file (MyAddon.lua):
Lua Code:
local button = CreateFrame("Button", "secureBtnTest", npcm_frameMain, "SecureActionButtonTemplate")
button:SetSize(32,32)
button:SetPoint("LEFT", npcm_frameMain, "RIGHT", 300, 0)
local texture = button:CreateTexture("$parent_tex", "BACKGROUND")
texture:SetAllPoints(true)
texture:SetTexture(GetSpellTexture("Forme de Voyage"))
button.texture = texture
button:SetAttribute("type", "macro")
button:SetAttribute("macrotext", "/sit")
button:SetScript("PostClick", function(self, arg1)
print(self:GetName(), arg1, self:GetAttribute("macrotext"))--testing
end)
Nothing happens when the button is clicked (and no error message nor warning about blocked action).
Thank you for your help.