[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Call a local function by name.
- From: Laurent Faillie <l_faillie@...>
- Date: Fri, 03 May 2013 17:37:52 +0200
Le 03/05/2013 17:27, Mark Gabby a écrit :
> Someone correct nee if I'm wrong, but you can't, unfortunately. Local
> functions and variables are special in Lua. They're stored as
> numerical IDs internally.
> You could use debug.getlocal to iterate over all locals, look for a
> matching name, and call its value, but that would be rather awkward.
> Though you could wrap it in an (inefficient) function.
In this case, I would prefer to stay with my current loadstring()