Error in OldSpellButton_UpdateButton: Attempt to index field 'bar' (nil value)
Description:
When using the following code inside the OldSpellButton_UpdateButton function:
self:SetAttribute("type", "flyout")
self:SetAttribute("spell", spellID)
I encountered the following error:
11x ...eBlizzard_ActionBar/Mainline/SpellFlyout.lua:241: attempt to index field 'bar' (a nil value)
[string "@Blizzard_ActionBar/Mainline/SpellFlyout.lua"]:241: in function `Toggle'
[string "@OldSpellBook/OldSpellBookFrame.lua"]:513: in function <OldSpellBook/OldSpellBookFrame.lua:508>
Locals:
self = SpellFlyout {
isActionBar = true
eventsRegistered = false
Background = Frame {
}
}
flyoutID = 224
parent = OldSpellButton10 {
}
direction = "RIGHT"
distance = 0
isActionBar = true
specID = nil
...
(*temporary) = "attempt to index field 'bar' (a nil value)"
Steps to reproduce:
- Use
OldSpellButton_UpdateButton to update a flyout spell button.
- Set the following attributes:
self:SetAttribute("type", "flyout")
self:SetAttribute("spell", spellID)
- The error appears when attempting to toggle the flyout in the spellbook.
Expected behavior:
Clicking the button should open the flyout without errors.
Actual behavior:
The error occurs when the function attempts to toggle the flyout, specifically due to an attempt to index a nil bar field in SpellFlyout.lua.
Possible fix:
From my understanding, the issue might be that the isActionBar flag is being incorrectly set to true. The Spellbook isn't an ActionBar.
WoW and AddOn Version:
WoW Version: 11.0.2
Addon Version: 0.5.1beta
Error in
OldSpellButton_UpdateButton: Attempt to index field 'bar' (nil value)Description:
When using the following code inside the
OldSpellButton_UpdateButtonfunction:I encountered the following error:
Steps to reproduce:
OldSpellButton_UpdateButtonto update a flyout spell button.Expected behavior:
Clicking the button should open the flyout without errors.
Actual behavior:
The error occurs when the function attempts to toggle the flyout, specifically due to an attempt to index a
nilbarfield inSpellFlyout.lua.Possible fix:
From my understanding, the issue might be that the
isActionBarflag is being incorrectly set totrue. The Spellbook isn't an ActionBar.WoW and AddOn Version:
WoW Version: 11.0.2
Addon Version: 0.5.1beta