Message: ...terface\AddOns\AftermathhUI_GUI\AftermathhUI_GUI.lua:282: attempt to get length of global 'boxes' (a nil value)
Time: 03/09/12 13:07:53
Count: 1
Stack: ...terface\AddOns\AftermathhUI_GUI\AftermathhUI_GUI.lua:282: in function <...terface\AddOns\AftermathhUI_GUI\AftermathhUI_GUI.lua:278>
...terface\AddOns\AftermathhUI_GUI\AftermathhUI_GUI.lua:290: in function `DisplayCheckboxes'
...terface\AddOns\AftermathhUI_GUI\AftermathhUI_GUI.lua:294: in main chunk
Locals: bin = <table> {
}
(*temporary) = 1
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to get length of global 'boxes' (a nil value)"
|
Sorry!
In your Checkbox function, you need to add at the end:
And then this line:
lua Code:
AftermathUIFrame.checkboxes = checkboxes
should have been
lua Code:
AftermathUIFrame.checkboxes = boxes
You should definitely listen to Phanx over me with respect to recycling...at the very least though I think you want to keep a table to hold on to the frames you're using. You could change ReleaseCheckboxes() to simply:
lua Code:
local function ReleaseCheckboxes()
local boxes = AftermathUIFrame.checkboxes
for i = 1, #boxes do
boxes[i]:Hide()
boxes[i] = nil
end
end