View Single Post
09-16-14, 03:41 AM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,327
You can either use button:HookScript("OnClick",func) or button:SetScript("PostClick",func) to test the spell data without risking the button's secure state.



button:HookScript() acts in a similar way to how hooksecurefunc() works on regular functions (post hook that doesn't taint the original function).

The button's PostClick handler is one of the 3 handlers run when clicked. The order being PreClick, OnClick, PostClick. The SecureActionButtonTemplate operates only on the OnClick handler, leaving the other two open for use by insecure code.
__________________
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-16-14 at 03:49 AM.
  Reply With Quote