Thanks, i came up with a similar method, i'm just not sure how legit is this. I don't really have much experience with this secure stuff:
XML Code:
<Frame name="ZPerl_Party_SecureState" inherits="SecureHandlerStateTemplate" parent="UIParent" protected="true">
<Attributes>
<Attribute name="_onstate-partymonitor" value="if newstate == 'nocombat' then elseif newstate == 'raid1' and self:GetAttribute('partyInRaid') then if not self:GetFrameRef('partyHeader'):IsShown() then self:GetFrameRef('partyHeader'):Show() end elseif newstate == 'party1' then if not self:GetFrameRef('partyHeader'):IsShown() then self:GetFrameRef('partyHeader'):Show() end else if self:GetFrameRef('partyHeader'):IsShown() then self:GetFrameRef('partyHeader'):Hide() end end"/>
</Attributes>
<Scripts>
<OnLoad>
SecureHandler_OnLoad(self)
self:SetFrameRef("partyHeader", ZPerl_Party_SecureHeader)
self:SetAttribute("partyInRaid", XPerlDB.party.inRaid)
RegisterStateDriver(self, "partymonitor", "[nocombat] nocombat; [target=raid1, exists] raid1; [target=party1, exists] party1; hide")
</OnLoad>
</Scripts>
</Frame>