View Single Post
07-26-16, 06:26 PM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
Originally Posted by Resike View Post
I think you want to do:

Lua Code:
  1. hooksecurefunc(SomeDopeyFrameName, "OnUpdate", function(self, elapsed)
  2.     print(self:GetName(), elapsed)
  3. end)

hooksecurefunc is designed to catch secure but mainly global functions, so thats why it might not be able to handle local funcitons.
I can use the original form to hook a function being used for an OnEvent script without problem. I'm pretty sure it was usable for OnUpdate pre 7.x.

I wasn't sure about the local thing.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.