Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-19-22, 12:41 AM   #1
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
SecureActionButtonTemplate with macrotext attribute not working

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:
  1. local button = CreateFrame("Button", "secureBtnTest", npcm_frameMain, "SecureActionButtonTemplate")
  2. button:SetSize(32,32)
  3. button:SetPoint("LEFT", npcm_frameMain, "RIGHT", 300, 0)
  4. local texture = button:CreateTexture("$parent_tex", "BACKGROUND")
  5. texture:SetAllPoints(true)
  6. texture:SetTexture(GetSpellTexture("Forme de Voyage"))
  7. button.texture = texture
  8.    
  9. button:SetAttribute("type", "macro")
  10. button:SetAttribute("macrotext", "/sit")
  11. button:SetScript("PostClick", function(self, arg1)
  12.     print(self:GetName(), arg1, self:GetAttribute("macrotext"))--testing
  13. end)

Nothing happens when the button is clicked (and no error message nor warning about blocked action).
Thank you for your help.
__________________
Zax - Addons List, not all maintained.
  Reply With Quote
 

WoWInterface » PTR » PTR General Discussion » SecureActionButtonTemplate with macrotext attribute not working


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off