Originally Posted by Kanegasi
frame names are global and someone else may have used "tooltip" as well.
|
Originally Posted by MunkDev
it's always wise to scope and name your own code properly so it doesn't conflict with anything else.
|
Thanks, that's enough to know.
Originally Posted by Ketho
Lua Code:
function TradeSkillDetailsMixin:OnResultMouseEnter(resultButton) if self.selectedRecipeID then GameTooltip:SetOwner(resultButton, "ANCHOR_RIGHT"); GameTooltip:SetRecipeResultItem(self.selectedRecipeID); CursorUpdate(resultButton); end resultButton.UpdateTooltip = resultButton.UpdateTooltip or function(owner) self:OnResultMouseEnter(owner); end; end
|
I didn't quite understand what the above code does. If it is possible, could you explain what each line does? I like using code I understand, so that I can modify it when needed.
Originally Posted by Ketho
Haven't tested your addon, but is the OnHide hook actually needed if you can just parent your tooltip to the TradeSkillFrame?
Code:
local f = CreateFrame("GameTooltip", "ProfessionItemtooltip", TradeSkillFrame, "GameTooltipTemplate")
|
Thanks, changed the parent and removed the OnHide hook. Works fine.