Hello
It definitively doesn't work well...
The problem is coming from the header.
When the header is created, it will create one child for each raid member.
When the number of raid member decrease, unused child are simply hidden.
When the number of raid member increase, unused child are used until there is no more left, and then the header will create new child if need.
It is not working fine, when the header need to create new child. You should have a error.
Even if you are disconnected from the game, it doesn't work well.
I added a try/catch statement in the code for this specific case.
This will prevent error to break all, and the window will be automatically rebuild at the end of the combat.
The only thing I can do for now, is to request Blizzard to add a argument option in the creation of the header, to ask the header to create by default 25 childs.
Request to Blizzard:
Add a new attribute in the header
header:SetAttribute("childnumber", "25");
In the file SecureGroupHeaders.lua, line 148
Code:
local needButtons = max(1, numDisplayed);
if not ( self:GetAttribute("child"..needButtons) ) then
local buttonTemplate = self:GetAttribute("template");
local templateType = self:GetAttribute("templateType") or "Button";
local name = self:GetName();
for i = 1, needButtons, 1 do
local childAttr = "child" .. i;
if not ( self:GetAttribute(childAttr) ) then
local newButton = CreateFrame(templateType, name and (name.."UnitButton"..i), self, buttonTemplate);
self[i] = newButton;
SetupUnitButtonConfiguration(self, newButton);
setAttributesWithoutResponse(self, childAttr, newButton, "frameref-"..childAttr, GetFrameHandle(newButton));
end
end
end
Replace by
Code:
local needButtons = max(1, numDisplayed);
local defaultnumberButtons = self:GetAttribute("childnumber");
if defaultnumberButtons and tonumber(defaultnumberButtons) then
if needButtons < tonumber(defaultnumberButtons) then
needButtons = tonumber(defaultnumberButtons);
end
end
if not ( self:GetAttribute("child"..needButtons) ) then
local buttonTemplate = self:GetAttribute("template");
local templateType = self:GetAttribute("templateType") or "Button";
local name = self:GetName();
for i = 1, needButtons, 1 do
local childAttr = "child" .. i;
if not ( self:GetAttribute(childAttr) ) then
local newButton = CreateFrame(templateType, name and (name.."UnitButton"..i), self, buttonTemplate);
self[i] = newButton;
SetupUnitButtonConfiguration(self, newButton);
setAttributesWithoutResponse(self, childAttr, newButton, "frameref-"..childAttr, GetFrameHandle(newButton));
end
end
end
This will help us a lot.