View Single Post
09-19-22, 01:41 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
You still need to call Button:RegisterForClicks() for the OnClick handler to work.

It's also good practice to make sure Frame:EnableMouse() or Frame:SetMouseClickEnabled() is set.
Frame:EnableMouse() is a legacy function that controls both clicks and mouseover while Frame:SetMouseClickEnabled() and Frame:SetMouseMotionEnabled() individually control each of their respective features.

On a side note, you don't need a SecureActionButton to send /sit. It's processed as an emote using the "SIT" and DoEmote() is not protected. You can run it as DoEmote("SIT").
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 09-19-22 at 02:00 PM.
  Reply With Quote