Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
(Solution)
Line 15: Line 15:
   
 
this.UpdateTooltip = MyAddon_ItemFrame_OnUpdate(a);
 
this.UpdateTooltip = MyAddon_ItemFrame_OnUpdate(a);
  +
  +
--[[User:Uniring|Uniring]] 14:56, 6 November 2007 (UTC)

Revision as of 14:56, 6 November 2007

I think it does slightly more...

For example open your backpack and run this command:

/run GameTooltip:SetOwner(ContainerFrame0Item1);

Game tooltip will in fact display information about item in the first slot of your backpack! Without in fact calling GameTooltip:SetBagItem(). This slightly confuses me as then it is not clear where this information comes from and what :SetBagItem(), :SetInventoryItem() are actually for... Anyone knows? Fibby 23:31, 19 September 2007 (UTC)

Solution

This happens because of the new tooltip update system as it will execute the default OnEnter function of the item frame on every update. To avoid this, simply change the frame.UpdateTooltip parameter to your update function. For example, if you have a function called:

MyAddon_ItemFrame_OnUpdate(a) { ... }

Put this in the OnLoad event of the frame:

this.UpdateTooltip = MyAddon_ItemFrame_OnUpdate(a);

--Uniring 14:56, 6 November 2007 (UTC)