Yeah, you need the name of the frame to do this.
Code:
local f = kgPanel:Fetch("myframenameforspec2") --or whatever this line should be
local spec = GetActiveTalentGroup(false,false)
if spec == 1 then
self:Show()
f:Hide()
elseif spec == 2 then
self:Hide()
f:Show()
end
Put the above in the OnEvent section of your spec1 panel. In OnLoad, you'll need to register for ACTIVE_TALENT_GROUP_CHANGED
Code:
self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")