Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-30-19, 01:02 PM   #1
Lybrial
A Flamescale Wyrmkin
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 120
HookScript after SetScript not working?

Hi,

I thought Ace HookScript function would hook on any script and first process the handler
and after that the original function.

How ever when I do the following:

Lua Code:
  1. self.frame:SetScript("OnEvent", function()
  2.     print("original function");
  3. end);
  4.  
  5. self:HookScript(self.frame, "OnEvent", function()
  6.     print("hooked function");
  7. end);

"original function" will be printed but "hooked function" wont ever be printed.
So whats the thing about that?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » HookScript after SetScript not working?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off