View Single Post
04/30/14, 12:30 PM   #12
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Originally Posted by skyraker View Post
No. It is simply toggleFunction = "Toggle"..lblName



Yeah, in the end I think I will need to go to some sort of global table if I want to keep the functions local. Not quite in this way if what I am reading is correct. I would still like to dynamically change what comes after Toggle on each iteration if I can help it because it keeps the code concise.
If this is the case, and your function is local (which I think you said above), then you cannot do it this way. You can't grab a local out of the global table (_G) because it's not global - you made it local.

Do what Iyanga said.
/edit: though I would probably make the table keys be your button names.
  Reply With Quote