i feel like this should definitely work.
Code:
self.frame:SetScript("OnEvent", function()
print("original function");
end);
self:HookScript(self.frame, "OnEvent", function()
print("hooked function");
end);
in this code you are hooking different objects tho
self and
self.frame
it should work like that:
Code:
self.frame:SetScript("OnEvent", function()
print("original function");
end);
self.frame:HookScript("OnEvent", function()
print("hooked function");
end);
if you want to do it the way you did in your HookScript() you need to do the following (repalce colon with a simple dot)
Code:
self.frame.HookScript(self.frame, "OnEvent", function()
print("hooked function");
end);
^ is equivalent to replacing the dot before HookScript() with a colon and removing the first argument