Post hooks a script handler (secure).
- ("handler", func)
for i = 1, 4 do local frame = _G["PartyMemberFrame"..i] frame:HookScript("OnClick", function(self, button) print(self:GetName() .. " clicked with " .. button) end) end
Alert the player when he clicks a party member's portrait while preserving the security of the unit frame after calling its original handler.
- Just like hooksecurefunc, this can be used on secure code.
- If the frame doesn't have a func for handler, one will be created as if you called :SetScript("handler", func).
- Every script handler has at least one argument (the frame itself, usually self). See widget handlers for details on each handler.