A Firelord
Join Date: Nov 2008
Posts: 454
|
Hm, I managed to spawn MTT and party pets through headers. When I try to spawn party target though, I get this:
1x oUF-1.5.8\ouf.lua:468: CreateFrame(): Couldn't find inherited node "party"
oUF-1.5.8\ouf.lua:468: in function `SpawnHeader'
oUF_Rain-pre alpha\oUF_Rain.lua:264: in function `func'
oUF-1.5.8\factory.lua:17: in function <oUF\factory.lua:13>
(tail call): ?:
Locals:
self = "oUF_Rain_PartyTargets"
overrideName = nil
template = "party,raid"
visibility = "showParty"
isPetHeader = nil
name = "oUF_Rain"
style = "Rain"
error = <function> @ oUF\private.lua:20:
generateName = <function> @ oUF\ouf.lua:345:
select = <function> defined =[C]:-1
styleProxy = <function> @ oUF\ouf.lua:404:
initialConfigFunction = " local header = self:GetParent()
local frames = table.new()
table.insert(frames, self)
self:GetChildList(frames)
for i=1, #frames do
local frame = frames[i]
local unit
-- There's no need to do anything on frames with onlyProcessChildren
if(not frame:GetAttribute'oUF-onlyProcessChildren') then
RegisterUnitWatch(frame)
-- Attempt to guess what the header is set to spawn.
if(header:GetAttribute'showRaid') then
unit = 'raid'
elseif(header:GetAttribute'showParty') then
unit = 'party'
end
local headerType = header:GetAttribute'oUF-headerType'
local suffix = frame:GetAttribute'unitsuffix'
if(unit and suffix) then
if(headerType == 'pet' and suffix == 'target') then
unit = unit .. headerType .. suffix
else
unit = unit .. suffix
end
elseif(unit and headerType == 'pet') then
unit = unit .. headerType
end
frame:SetAttribute('*type1', 'target')
frame:SetAttribute('*type2', 'menu')
getCondition = <function> @ oUF\ouf.lua:329:
---
|
Here the code I use to spawn the headers:
lua Code:
if (cfg.showParty) then local party = self:SpawnHeader("oUF_Rain_Party", nil, "party,raid", "showParty", true, "showRaid", true, "showPlayer", true, "showSolo", true, "maxColumns", 5, "unitsPerColumn", 1, "columnAnchorPoint", "LEFT", "columnSpacing", 7.5, "oUF-initialConfigFunction", [[ self:SetWidth(110) self:SetHeight(22) ]] ) party:SetPoint("LEFT", UIParent, "CENTER", -231.25, -250) party:Show() end if (cfg.showParty and cfg.showPartyTargets) then local partyTargets = self.SpawnHeader( "oUF_Rain_PartyTargets", nil, "party,raid", "showParty", true, "showRaid", true, "showPlayer", true, "showSolo", true, "maxColumns", 5, "unitsPerColumn", 1, "columnAnchorPoint", "LEFT", "columnSpacing", 7.5, "oUF-initialConfigFunction", [[ self:SetWidth(110) self:SetHeight(22) self:SetAttribute("unitsuffix", "target") ]] ) partyTargets:SetPoint("TOPLEFT", "oUF_Rain_Party", "BOTTOMLEFT", 0, -27.5) partyTarget:Show() end if (cfg.showParty and cfg.showPartyPets) then local partyPets = self:SpawnHeader( "oUF_Rain_PartyPets", nil, "party,raid", "showParty", true, "showRaid", true, "showPlayer", true, "showSolo", true, "maxColumns", 5, "unitsPerColumn", 1, "columnAnchorPoint", "LEFT", "columnSpacing", 7.5, "oUF-initialConfigFunction", [[ self:SetWidth(110) self:SetHeight(11) self:SetAttribute("unitsuffix", "pet") ]] ) partyPets:SetPoint("TOPLEFT", "oUF_Rain_Party", "BOTTOMLEFT", 0, -7.5) partyPets:Show() end if (cfg.showMT) then local mainTanks = self:SpawnHeader( "oUF_Rain_MT", nil, "raid", "showRaid", true, "groupFilter", "MAINTANK", "yOffset", -7.5, "oUF-initialConfigFunction", [[ self:SetWidth(110) self:SetHeight(22) ]] ) mainTanks:SetPoint("TOPLEFT", UIParent, "LEFT", 50, -50) mainTanks:Show() end if (cfg.showMT and cfg.showMTT) then local mainTankTargets = self:SpawnHeader( "oUF_Rain_MTT", nil, "raid", "showRaid", true, "groupFilter", "MAINTANK", "yOffset", -7.5, "oUF-initialConfigFunction", [[ self:SetWidth(110) self:SetHeight(22) self:SetAttribute("unitsuffix", "target") ]] ) mainTankTargets:SetPoint("TOPLEFT", "oUF_Rain_MT", "TOPRIGHT", 7.5, 0) mainTankTargets:Show() end
So it's not me, it's just bugged?
|