Originally Posted by Lombra
Huh.. that seems weird. Should really rename that function then. But if it stays, it could be neat. RegisterUnitEvent("ADDON_LOADED", "MyAddon") \o/
|
Exactly, saves us having the if-check like this!
If you call it from the root of the file you can even
:RegisterUnitEvent("ADDON_LOADED", (...)) since ... contains the addon name too, hehe. It's in parenthesis to strip away the table argument, maybe it will bug it or it may compare the string with the table, quite unnecessary.
*Edit*
Hmm, sadly, I tested using this:
Code:
/run CreateFrame("Frame","T")T:RegisterUnitEvent("ADDON_LOADED","Blizzard_PetJournal")T:SetScript("OnEvent",print)
And it fired the print each time ADDON_LOADED fired, not just for the Blizzard_PetJournal :'(