Originally Posted by Nikita S. Doroshenko
The thing that is confusing me, is hoocsecurefunc sometimes toggle lua errors like "funxtionX is not a function"
For example, I tried to hook some functions like function PlayerTalentFrame_UpdateSpecFrame(self, spec) from Blizzard_TalentUI.lua:
-snip-
So I used this code:
-snip
And got this: Error. hooksecurefunc(): PlayerTalentFrame_UpdateSpecFrame is not a function
At the same time, for example:
-snip
Works perfectly.
Can't understand why this happens, and will appreciate any advises how to hook functions with "funxtionX is not a function" error.
|
Blizzard_TalentUI is LoadOnDemand, you need to wait for ADDON_LOADED and check for Blizzard_TalentUI, or set your addon to LoadOnDemand and LoadWith Blizzard_TalentUI, depending on your use case.