View Single Post
07-28-13, 09:50 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
No, say v = "MyFrame" - this is a string with the text of a frame name.

v = _G[v] looks up "MyFrame" (the string) in the global table and sees that it is the global name of a frame object. The variable v is then set to the actual frame object. In other words, whatever the right side evaluates to, the left side will be set to.

You can then do v:SetAlpha() because v is referencing the frame itself, not the frame name.


/edit: You think the above works backwards from how it actually does. You're replacing the entry in the global table with a string. You're breaking the whole UI.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote