View Single Post
04/29/14, 06:46 PM   #1
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
Strings as function calls

I'm trying to convert the use of a string as a function call from the global namespace to calling local functions.

Lua Code:
  1. buttonname:SetHandler( "OnClicked" , function() _G[toggleFunction](buttonname) end)

How do I make this same call of toggleFunction without those functions being global? For example, toggleFunction ends up being ToggleLocation, but I have local function ToggleLocation?
  Reply With Quote