if isSameRealm and isPlayer andnot hasGuild andnot alreadyInvited andnot alreadyOnList then isElligible =trueend
Now I need to use prospects identified to create a frame (or set a frames) that will allow me to:
- Target the prospect (obviously this doesn't need to happen first, but it's the part I currently anticipate being the most difficult)
- Whisper them to ask if they would might signing my guild charter
- Request GuildCharterSig
- Remove the frame(s) for that prospect so that there are always 10 (arbitrary number) of these secure buttons fit to the frame
For this, I'm given to understand FramePools are the way to go...but after browsing the source code and finding frustratingly few examples, I'm still lost on how to implement this.
Currently I'm trying to sort out just how to create the frames...I havn't even really been able to figure out how to keep ten populated at all times.
My attempt to create the "TargetUnit" frame is:
local pool = CreateFramePool("Button", GuildCreator, "SecureUnitButtonTemplate")
-- To create or reuse a button:
local button = pool:Acquire()
local t = button:CreateFontString()
button:SetSize(WIDTH-10, HEIGHT/10)-- make the width slightly smaller than it's parent frame and make room for ten active buttons