lua-users home
lua-l archive

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

Because tables have their own metatables, there's may not be global metatable for all tables. Same for full userdata. Dunno about lightweights.

----- Original Message ----- From: Fernando P. García
To: Lua list
Sent: Monday, October 26, 2009 4:12 AM
Subject: Re: Metatables, C and Script...

All 'obj:method' calls must pass 'obj' as the first parameter to function, no metter what type 'obj' is. So it's extremely wierd if it doesn't. I haven't tried this on objects, but it works well with strings and numbers. Maybe I couldn't understand what your problem is.

I'm curious about why following does not works:

Lua 5.1.4  Copyright (C) 1994-2008, PUC-Rio
stdin:1: attempt to call method 'concat' (a nil value)
stack traceback:
   stdin:1: in main chunk
   [C]: ?

Fernando P. García,
Developer - Analista de Sistemas
+51 1 9 8991 7871, Calle Santa Catalina Ancha #377, Cusco -Perú

** Antes de imprimir este mensaje piensa en tu compromiso con el medio ambiente, protegerlo depende de tí.