[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: "or" question
- From: Tomas <tomas@...>
- Date: Thu, 11 Nov 2004 21:19:50 -0200 (BRDT)
> __index = function(object, key)
> local result = SpriteMethods[key] or
> AnimationMethods[key]
Variable result could be false?
> if result == nil then
> result = (ObjectTables[SSGetUserDataObjectPtr(object)] or {})[key]
Again: result could be false?
> if result == nil then
> result = IdentityMethods[key] or
> ObjectMethods[key] or
> AdvanceableSpriteMethods[key]
> end
> end
>
> return result
> end,
If the variable `result' could receive a `false' value, you might not
change the code.
Tomas