Originally Posted by skyraker
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.