View Single Post
03-09-12, 05:22 PM   #35
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by Nibelheim View Post
Need to change last line to:

LUA Code:
  1. AftermathhUIFrameSub1:SetScript("OnClick", function() CheckBoxes(1) end)
Originally Posted by kaels View Post
Sorry!

In your Checkbox function, you need to add at the end:
lua Code:
  1. return checkbox

And then this line:
lua Code:
  1. AftermathUIFrame.checkboxes = checkboxes
should have been
lua Code:
  1. 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:
  1. local function ReleaseCheckboxes()
  2.     local boxes = AftermathUIFrame.checkboxes
  3.    
  4.     for i = 1, #boxes do
  5.         boxes[i]:Hide()
  6.         boxes[i] = nil
  7.     end
  8. end
Thanks both =)

yaya! it works, doh... the font string is still there ><

Last edited by Aftermathhqt : 03-09-12 at 06:29 PM.
  Reply With Quote