A lot of my addons started tossing lua errors this patch and some may not be updated which means I may have to manually update them. One of the major issues seems to be coming from this change:
SharedTooltipTemplate and GameTooltipTemplate no longer inherit BackdropTemplate
For example in Astral keys, the tooltip frame is currently created this way:
local AstralKeyToolTip = CreateFrame( “GameTooltip”, “AstralKeyToolTip”, AAFrame, “GameTooltipTemplate” )
But as the note says that GameTooltipTemplate no longer inherits BackdropTemplate so all the backdrop functions are now failing. Is there an easy way for me to modify this to reintroduce the BackdropTemplate functionality.
Side note, the AAFrame (the parent class) in that call seems to come from out of nowhere. I searched the whole addon directory and that is the only reference I can find. I install addons manually so it can’t be linking outside to another addon unless this is a blizzard supplied parent class?
local AstralKeyToolTip = CreateFrame( “GameTooltip”, “AstralKeyToolTip”, AAFrame, “BackdropTemplate,GameTooltipTemplate” )
It’s likely the AAFrame was made dynamically based on a concatenated name. It seems very weird it’d use it directly like that. It’s certainly not something in the default UI.
Thanks that fixed astral, so I’ll get to work on messing with the other addons that need it.
Yeah it’s weird for sure. I did a full directory search in vscode on the addon, and that is the only location AAFrame shows up. I’m not versed in LUA enough to have any idea where it originates unless like you said the function just creates it if it doesn’t exist.
If the addon created a frame named “AA” then a child frame named “$parentFrame” it would produce a frame named AAFrame (the $parent is automatically replaced with the parent frame name).
I looked at Titan’s fix and they seemed to change theirs by what looks like adding an additional special frame just for the backdrop. This is the code around that if it helps:
local tip_name = frame:GetName()
local tip_back_name = tip_name…“Backdrop”
local tip_back_frame = _G[tip_back_name] or CreateFrame(“Frame”, tip_back_name, frame, BackdropTemplateMixin and “BackdropTemplate” or nil)
Or perhaps the “or nil” part? It’s a bit out of my league so sorry I don’t have better.
The whole BackdropTemplateMixin and "BackdropTemplate" or nil was a way of writing code that was compatible for both classic and retail, when the backdrop rules were inconsistent between them all.
It’s no longer necessary. Anything that should be a backdrop can just simply inherit "BackdropTemplate" as the fourth argument in CreateFrame.
Message: Interface\AddOns\TipTac\ttCore.lua:730: attempt to call method 'SetBackdropColor' (a nil value)
Time: Wed Nov 3 10:57:02 2021
Count: 2
Stack: Interface\AddOns\TipTac\ttCore.lua:730: attempt to call method 'SetBackdropColor' (a nil value)
[string "=[C]"]: in function `SetBackdropColor'
[string "@Interface\AddOns\TipTac\ttCore.lua"]:730: in function <Interface\AddOns\TipTac\ttCore.lua:717>
[string "=[C]"]: ?
> -- Tooltips from world objects that change cursor seems to also require this. (Tested in 8.0/BfA)
> if (self:IsOwned(UIParent)) and (not self:GetUnit()) then
> if not self.SetBackdrop then
> Mixin(self, BackdropTemplateMixin)
> end
> self:SetBackdropColor(unpack(cfg.tipColor));
> end