In addition to what Seerah said, you don't check which event fired by calling their names (e.g.
GOSSIP_SHOW()), they're not functions.
kgPanels provides the OnEvent handler with an
event argument whose value is the name of the event that fired.
So the code would look like this:
lua Code:
if event == "GOSSIP_SHOW" or event == "BANKFRAME_OPENED" then
ChatFrame1:Hide()
ChatFrame3:Hide()
ChatFrame1ButtonFrame:Hide()
ChatFrame3ButtonFrame:Hide()
ChatFrameMenuButton:Hide()
GeneralDockManager:Hide()
FriendsMicroButton:Hide()
else
ChatFrame1:Show()
ChatFrame3:Show()
ChatFrame1ButtonFrame:Show()
ChatFrame3ButtonFrame:Show()
ChatFrameMenuButton:Show()
GeneralDockManager:Show()
FriendsMicroButton:Show()
end
Keep in mind that you need to register these events in the OnLoad script if you want them to fire for your panel.