[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Interfacing lua with C
- From: "jimmyp_gr <jimmyp@...>" <jimmyp@...>
- Date: Thu, 16 Jan 2003 02:42:44 -0000
--- In lua-l@yahoogroups.com, Luiz Henrique de Figueiredo <lhf@t...>
wrote:
> >According to the manual the __newindex metamethod is
> >the settable event.I tried setting the same var twice(i=2;i=3;) and my
> >metamethod got called twice.
>
> That's because your __newindex function didn't set the value of "i"
the first
> time. This may be or not what you want.
Hmmmm, definately not.Why are there so few metamethods?One for reading
a table value(anytime) and for the assignment operator would
definately come in handy.Are there design restrictions that don't
allow this?So now I'll have to work around writing C vars(more than
once) and mixing C and lua globals.And everything was so simple in lua4...