View Single Post
Old 08-30-12, 06:44 AM   #18
Morsker
A Fallenroot Satyr
 
Morsker's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 22
Originally Posted by Aelorean View Post
Here is a zip file with the addon. There are really only 3 files other than the libs: "Config.lua", "Squire2.lua" and "Localization.lua".
The pre-hooking UIErrorsFrame_OnEvent is suspicious. The right implementation is to replace UIErrorsFrame's OnEvent handler, not to prehook the function. There's a little mod called pError that's an example of the right way to do it. Or if all the mod is trying to do is suppress error messages, you can unregister and reregister the event:

UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE")
-- whatever code might generate errors
UIErrorsFrame:RegisterEvent("UI_ERROR_MESSAGE")

Also Config.lua is setting something called PanelButton_OnHide globally, although it appears completely unused; I don't know why it's there at all.
Morsker is offline   Reply With Quote