Thread: Hookscript
View Single Post
01-06-22, 06:08 AM   #6
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
From https://github.com/tomrus88/Blizzard...merAugment.lua I'd guess the callback gets called with the right object to use cancel on. So this should work:

Lua Code:
  1. local T = C_Timer.NewTicker(1, function(self)
  2.         if CUSTOMFRAME then
  3.             CUSTOMFRAME:HookScript("OnUpdate", function(self)
  4.                 print("have it")
  5.             end)
  6.             self:Cancel()
  7.         end
  8.     end)
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote