[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Emulate setters and getters on table
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 25 Feb 2013 15:32:58 +0200
On Mon, Feb 25, 2013 at 3:28 PM, Alfredo Palhares
> Its there a way to call a method based on a string ?
> like method = "set" .. key and the use it?
local method = "set_" .. key
Note passing the object as the first argument - that's basically all
what : does.