Just a quick update on my question. I've still not found the code to correctly drop an item without causing an error. I did finally think about adding a row dynamically if needed.
if not (hideWorldXP and indexWorldXP == 0) then
o.Tools[_addon.G.BAR_TOOL_SpecialWorldXPBar] = { Name = "creature_xp_bar_enabled", Control = nil }
end
So, don't add the item by default, then add when needed. It's better than what I had, though I wish I understood why removal wasn't working.
|