View Single Post
04-16-21, 10:17 AM   #8
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
The the name you give a frame is entered into the global table as a reference to that frame. If I remember correctly, the first frame with a given name gets the global table variable.

If you have more than one frame called TestFrame then running TestFrame:SetShown(not TesFrame:IsShown()) will toggle the first TestFrame created which may not be yours or more likely is one of the other 50 TestFrames you've got sitting in long forgotten test code.

Giving unique names to anything created as a global is good advice as you're sharing that space with all other addons including the entire Blizzard default UI.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote