I've actually been starting to do tests on the existence of self in my functions just in case that has been wiped. Every value is being tested before being used just in case.
eg
function CreateMyFrame(...)
local f = CreateFrame(...)
f.AFunction = function(self)
if not self then return end
...
end
return f
end
local myframe = CreateMyFrame(...)
if ( myframe ) then myframe:AFunction(...) end
lots of testing but its the only way I know of getting it to gracefully bow out instead of erroring left right and center.
I'm starting to wonder if the new introduction of the local addonTable, addonData = ... feature to create a local but yet addonwide table has started a wave of altering the scope of variables.
And yeah its annoying that it seems to be doing that.
|