lua-users home
lua-l archive

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

On Tuesday 17 September 2002 17:29, Gaurav wrote:
> I presume you should use rawset before using rawget.
> (as rawget alone does not work).
> rawset(A,new,A:new) it does not work, but gives me an error.

Hi Gaurav,

You do not need to use rawset.  The index tag method is only called when a 
table get event happens.

Two more things:
When using using rawset, the syntax is rawset(A,'new', x).
The colon is only used when defining or calling a function so the syntax 
A:new without any paranthesis after it is invalid.

- Peter