|
Thanks On Mar 15, 2007, at 7:03 PM, Rici Lake wrote:
Graham Wakefield wrote:Hi all,I'm having trouble using __call in a metatable for userdata; is this supported?Yes.Here's a rough sketch: print(Noise) table.foreach(Noise, print) noise = Noise()Noise is a metatable. You create a userdata, setmetatable it to the Noise table, and then call the userdata. (No need to expose Noiseto the Lua environment.)