lua-users home
lua-l archive

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


David,

thank you for the quickly response :)

well... I tried your dir function with a table and it printed the keys
and values for me (not the table's attributes and methods)

and tried it with a userdata and an error has been raised:

(read_query) cached_queries.lua:6: bad argument #1 to 'pairs' (table
expected, got userdata)

Javier,

thank you also... and maybe your message clarify the clouds are in my
mind :) well... if Lua hasn't objects, means this that most of data
types won't retrieve to me a map of their own attributes and methods?

I mean: in Python, I use dir() to list all that an object has and this
makes me knows that an object has the method that I need, and so on...
this makes me gain hours of research, just using the intuition.

PS: if you are brazilian, let me know if I can send to you in PVT,
maybe using portuguese I can explain better my questions :)

thank you all

2008/7/14 Javier Guerra <javier@guerrag.com>:
> On Mon, Jul 14, 2008 at 3:00 PM, Marinho Brandao <marinho@gmail.com> wrote:
>> my question is: has Lua equivalent functions to them?
>
> just remember that Lua doesn't have 'objects'.
>
> complex values are either tables, which you can enumerate, or
> something else with a metatable, also enumerable.
>
> --
> Javier
>



-- 
Marinho Brandão (José Mário)
http://marinho.webdoisonline.com/