lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Feb 25, 2013 at 3:28 PM, Alfredo Palhares
<> wrote:
> Its there a way to call a method based on a string ?
> like method = "set" .. key and the use it?

Very easy.

    local method = "set_" .. key

Note passing the object as the first argument - that's basically all
what : does.