Please note that I'm just trying to understand and I'm not trying to argue. I truly want to understand.
While writing this reply I figure I would do a little testing first. I must apologize for you are correct. It seems that the header is working like you said. The documentation I have isn't very clear and is technically incorrect.
Now I have a different question. If I want an option to hide the party frame when in a raid would I simple hide the frame when entering a raid group then show it when leaving?
I would like to thank you for all your help and standing your ground. My personality needs this. You clearly stated you were correct and I have to prove my statements. Too bad I couldn't. Well I guess a person (me) can always be right. I'm glad you helped me figure it out.
We are both talking about SecureGroupHeaderTemplate correct?
My issue is when you want one frame to display the party and one frame to display the raid. The raid frame works as expect so there is no problem there. However on the party frame unless you have "showRaid" true it will disappear when you go into a raid.
The documentation from wowprogramming.com.
showRaid - Boolean - When true, the group header is shown when the player is in a raid.
showParty - Boolean - When true, the group header is shown when the player is in a party. This attribute doesnt imply showRaid but can work alongside it.
If I misunderstood how the property works, I would have quite a few bugs in unit frames due to it :p
There are two group units, party# and raid#. Using showParty tells the header to show all party# units, using showRaid tells the header to show all raid# units. party# will always be your current group, as such it's unnecessary to use groupFilter. I'm not quite sure why Adirelle added groupFilter for showing your party, but unless what you really want is something different from seeing your party, it's unnecessary.
This works except when you are in a raid and get moved around a lot. I have yet to figure out how to change the group filter while in combat. Having the group number as an attribute really prevents addon from correcting themselves when your in combat but the raid leader is moving people around. If you get moved in combat then your party will be incorrect until you go out of combat.
oUF does use what you tell it to use, e.g. SecureGroupHeaderTemplate if you want to. In this case, oUF takes care of setting up the header to apply your layout to the created unit frames. You still have to layout your different headers. Sample code:
-- define and select your oUF style here
-- single unit
local player = oUF:Spawn("player", "oUF_MyPlayerFrame")
-- party group
local party = oUF:Spawn("header", "oUF_MyParty")
party:SetManyAttributes("showParty", true, "groupFilter", 1)