Quantcast WoWInterface - View Single Post - SecureHandlerAttributeTemplate optimization
View Single Post
03-16-19, 04:12 PM   #2
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
You don't have to use table.insert in Execute snippets, you can just `button[i] = ...`.

I think you have a flaw in the inner for cycle:
Lua Code:
  1. for j = 1, 6 do
  2.     if not overridebuttons[i]:GetAttribute('statehidden') then
  3.         buttons[j]:SetAttribute('statehidden', false)
  4.         buttons[j]:Show()
  5.     else
  6.         buttons[j]:SetAttribute('statehidden', true)
  7.         buttons[j]:Hide()
  8.     end
  9. end
  Reply With Quote