Originally Posted by Fizzlemizz
That's what we're doing.
You may also be having trouble with positioning. If you /fstack over the buttons you'll probably find you have a bunch of "BMUDButton"..xxx buttons positioned over the top of each other.
Edit: Thanks syncrow. You will need to keep a tally rather than just using the last itemCount value for the text.
The recycle code
Lua Code:
local BMUDButton if not _G["BMUDButton"..name] then -- Button does not exist so create it BMUDButton = CreateFrame("Button", "BMUDButton"..name, UIParent, "SecureActionButtonTemplate"); -- BMUDButton points to a shiney new button else BMUDButton = _G["BMUDButton"..name] -- BMUDButton points to the previously created button end
|
I understand this. however I do not understand what you put in place of :
-- BMUDButton points to a shiney new button
or
-- BMUDButton points to the previously created button
I get the concept.
What the hell is the syntax?
What you have so far works great. But once I have a button and use it and no longer have the beacons, the button persists. No event will remove it. Any ideas?