Originally Posted by Phanx
Rather than setting that global "OtherPanel" in the second panel's OnLoad script, you should just use the method kgPanels provides for accessing other panels:
Code:
function self:OnClick()
ToggleAllBags() -- Call the local reference to ToggleAllBags
local OtherPanel = kgPanels:FetchFrame("Name of the second panel")
OtherPanel:SetShown(not OtherPanel:IsShown())
end
|
Indeed, that's a nicer solution. I forgot kgPanels had that.