Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

ESOUI » Developer Discussions » Lua/XML Help » Strings as function calls


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off