The local addon name and table might not exists in TBC, but the only thing you need to do is to change it to
Code:
local LogFixer = {}
to have a local table.
Or you can create the frame at the beginning instead of line 99 and point to it, e.g. by
Code:
local LogFixer = CreateFrame("Frame")
local frame, instanceType, lastEvent = LogFixer
- - and comment out / delete line 99 (
frame = CreateFrame("Frame") )
1. The second argument to CreateFrame is
name,
Code:
frame = CreateFrame("frameType" [, "name" [, parent [, "template"]]]
http://wowprogramming.com/docs/api/CreateFrame
2. Why would you inherit a simple table or event frame from a ChatFrame? It a totally different type of frame.
(And DEFAULT_CHAT_FRAME is a global ChatFrame variable that is provided for AddOns to output in/get the current default chat frame and you should never interfere in such a way with default variables and frames).
I did not intend to speak down on you in any way.
It's just that the approach is 'amateurish' and way to complex. (Which I do understand as this was actually an amateur giving it a try.
Which I
appreciate. It's just not the right way.)
I don't want to be harsh on you, I want to point out unnecessary or possibly harmful coding practices / errors.
All I'm saying is: Change it to the proper way, please.
You contributions are appreciated a lot!