Okay... let me be more precise.
I'm getting the error,
"CreateFrame: Couldn't find "this" in parent object" on
this line.
However, if I change it, I get the error,
"attempt to index field "?" (a nil value)"
here.
Code:
lib.genHoly = function(self)
if select(2, UnitClass("player")) ~= "PALADIN" then return end
local ClassIcons = {}
for i = 1, 5 do
local Icon = CreateFrame("StatusBar", nil, ClassIcons)
Icon:SetSize(20, 20)
Icon:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 7)
Icon:SetStatusBarTexture(config.statusbar_texture)
Icon:GetStatusBarTexture():SetHorizTile(false)
Icon:SetBackdrop(backdrop)
Icon:SetBackdropColor(0,0,0,1)
-- Map the method oUF tries to call to one that actually exists:
Icon.SetVertexColor = noop
if i == 1 then
ClassIcons[i]:SetPoint("LEFT", ClassIcons)
else
ClassIcons[i]:SetPoint("LEFT", ClassIcons[i-1], "RIGHT", 10, 0)
end
ClassIcons[i] = Icon
end
ClassIcons.PostUpdate = HolyPostUpdate
self.ClassIcons = ClassIcons
end
Sorry if I'm asking for too complex of an explanation, but I'm still not getting this. What should I set as the
parent frame?