[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: lua -w?
From:       PA <petite.abeille () gmail ! com>
Date:       2005-02-25 17:23:54
Message-ID: 58d6411f289844e4a342105887958627 () gmail ! com
[Download RAW message or body]


On Feb 25, 2005, at 18:02, Roberto Ierusalimschy wrote:

>> Is that on purpose? Is LUA_PATH mandatory?
>
> Not at all. This is a bug. Thanks.

Ok. For the moment I'm just assigning LUA_PATH to package.path. Is that 
reasonable?

Another issue when using -w... how do I check the presence of a key in 
a table now?

For example, I have this piece of code:

         if ( ( type( anObject ) == "table" ) and
                 ( type( anObject[ "equals" ] ) == "function" ) ) then

Which basically tries to check if the given table has a specific key. 
Unfortunately, this raises an exception:

lua: ./LUObject.lua:125: attempt to access undefined variable `equals'

What gives?

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic