Dear friends, I am trying to write an addon which lets me toggle the default party frames. Here is the core of it:
if PartyMemberFrame1:IsVisible() then PartyMemberFrame1:Hide(); else PartyMemberFrame1:Show(); end
if PartyMemberFrame2:IsVisible() then PartyMemberFrame2:Hide(); else PartyMemberFrame2:Show(); end
if PartyMemberFrame3:IsVisible() then PartyMemberFrame3:Hide(); else PartyMemberFrame3:Show(); end
if PartyMemberFrame4:IsVisible() then PartyMemberFrame4:Hide(); else PartyMemberFrame4:Show(); end
However, if there is less than 4 other members, the icons for disconnected members appear. Any ideas of how to fix this? Can one somehow record the number of party members, then do a couple of if-codes?
Any input appreciated!