[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Metatable __newindex on registered table of C functions
- From: "Duncan Cross" <duncan.cross@...>
- Date: Thu, 14 Aug 2008 10:42:51 +0100
On Wed, Aug 13, 2008 at 10:03 PM, John Dunn <John_Dunn@qscaudio.com> wrote:
> That doesn't appear to work, although accessing the __newindex directly
> does
>
> -- this works
> mt = getmetatable(Timer)
> mt.__newindex("EventHandler", TimerFunc)
>
> -- this doesn't
> Timer.EventHandler = TimerFunc
There are three parameters to __newindex, not two - the first is the
table itself, then the key and value.