Thread: Grid
View Single Post
08/28/14, 09:11 AM   #6
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
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:
  1. ZO_ControlPool.New(self, "XRGACompassPin", ZO_CompassContainer, XRGA.AddonInfo.Prefix.."Pin")
Lua Code:
  1. self.container = GetControl(scrollContainer, "ScrollChild")
  2.     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?
  Reply With Quote