Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

TWW: AccountBankPanel incorrectly sets OnUpdate in XML #590

Open mbattersby opened 6 days ago

mbattersby commented 6 days ago

(This does not cause any actual issue, but it is a bug and could cause a problem some day so I thought I would log it in case anyone at Blizzard is a programmer who has time to care about correctness.)

BankPanelMixin dynamically sets and nils the OnUpdate handler as part of its Dirty/Clean updating mechanism. See BankPanelMixin in Interface/AddOns/Blizzard_UIPanels_Game/Mainline/BankFrame.lua

The XML definition for AccountBankPanel specifies an initial OnUpdate handler even though the panel is not marked .isDirty, resulting in the OnUpdate handler being run continuously and unnecessarily until there is an update, isDirty = true is set and then :Clean() will process it and the correct OnUpdate toggling behaviour will commence.

Possible fixes include not setting the OnUpdate in the XML, setting .isDirty initially so one update goes through, or changing the logic in Clean() such that it always resets .isDirty and the OnUpdate handler.