Gah. I understand the concept of ControlPool, but I cannot seem to wrap my head around implementation. I see it called in different addons different ways and that gets confusing. I think what is getting me is what parameters it takes. Two examples from two addons:
Lua Code:
ZO_ControlPool.New(self, "XRGACompassPin", ZO_CompassContainer, XRGA.AddonInfo.Prefix.."Pin")
Lua Code:
self.container = GetControl(scrollContainer, "ScrollChild")
self.checkboxPool = ZO_ControlPool:New("ZO_Options_Checkbox", self.container, "Checkbox")
So obviously
self is the object the pool will be in. The first string object is the control (so in my case "GridLine"). The third parameter seems to be some container reference, though I cannot understand how that would apply to mine. The last parameter is the prefix for the ID of each object.
I guess that means I'm stuck on what container object I should use. Any thoughts?