lua-users home
lua-l archive

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


Ah...  yes.  That must be why I did it because

				result = (ObjectTables[SSGetUserDataObjectPtr(object)] or {})[key]

will most definitely pass back non nil values at times...

thx,
ando



Ando Sonenblick
   SpriTec Software
      ando@spritec.com

Come learn about Sprite Studio: The paradigm-shifting 2D Multimedia Authoring Environment for creating...

• Web Content: Animated GIF Banners, JPEGs, Linear Flash Movies, and more • QuickTime Content: Titling, Transitions, Post Processing Effects, and more • Desktop Content: Custom, Fully-Interactive, Graphic- and Animation-Intensive Mac/PC Desktop Applications

It's all at:  http://www.spritec.com


On Nov 11, 2004, at 3:19 PM, Tomas wrote:

	__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