Originally Posted by Fizzlemizz
The _G[] isn't required unless you're looking up the frame name as a string.
Code:
local f = Createframe("Frame", "FizzleFrameX", UIParent)
FizzleFrameX.Texture = FizzleFrameX:CreateTexture()
|
(fixed a typo for you)
I'm not sure I understand what you said. I mean, in the example you gave, you could equally do:
Lua Code:
local f = Createframe("Frame", "FizzleFrameX", UIParent)
f.Texture = f:CreateTexture()
In any case, me wanting the frame to be globally accessible doesn't have anything to do with the addon's normal operation. It's a personal addon, whose frames' positions and geometries I may sometimes change in the code (which I haven't in a long time, but that's beyond the point). Instead of coding the changes in the addon and then reloading the UI to check it out, I like to do
/run frame:SetPoint(...),
/run frame:SetWidth(...), etc, right there on the console. That's it.