News

World Of Warcraft: How to Fix AddOns Quickly

| 5 Jun 2006 23:59

If your AddOn that you loved is suddenly broken I recommend trying the following:

1. Go to Interface/AddOns/[Broken AddOn]/ and open the [Broken AddOn].xml file.
For example: for TotemTimers its TotemTimers.xml

2. Do a search for "GameTooltip", until you find a line that looks like:
<GameTooltip name="<Name>Tooltip" inherits="GameTooltipTemplate" parent="UIParent" hidden="true"/>

3. Change this section to:
<GameTooltip name="<Name>Tooltip" frameStrata="TOOLTIP" hidden="true" inherits="GameTooltipTemplate">
<Scripts>
<OnLoad>
this:SetOwner(WorldFrame, "ANCHOR_NONE");
</OnLoad>
</Scripts>
</GameTooltip>

(Make sure to change the "/>" to ">" this should be the only change on the first line.
4. Reload the AddOn and hope it works.

5. If you get errors after zoning, etc:
Most likely a more complex fix is needed.
Type "/console ReloadUI" in a chat window to reset, until the author can properly fix it.

EDIT: Changed UIParent to WorldFrame.
I found zoning and a few other events can call UIParent:Hide(), which will screw up tooltips.
If you encounter random errors after zoning etc.

The robust solution for mod authors:
Control your tooltip state!

Always make sure you have called SetOwner before you start a series of SetAction, etc.

Ex.

Tooltip:SetOwner(UIParent, "ANCHOR_NONE");
<Tooltip scanning loop goes here>
Tooltip:Hide()

Username:  
Password:  
Video of the Day
Featured Videos