Difference between revisions of "Getmetatable"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Available since:''' Gideros 2011.6<br/> | + | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> |
− | === Description === | + | === <translate>Description</translate> === |
<translate>If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.</translate> | <translate>If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.</translate> | ||
<source lang="lua"> | <source lang="lua"> | ||
(table) = getmetatable(object) | (table) = getmetatable(object) | ||
</source> | </source> | ||
− | === Parameters === | + | === <translate>Parameters</translate> === |
'''object''': (object) <translate>Object from which to get metatable</translate> <br/> | '''object''': (object) <translate>Object from which to get metatable</translate> <br/> | ||
− | === Return values === | + | === <translate>Return values</translate> === |
− | '''Returns''' (table) <translate>metatable</translate><br/> | + | '''<translate>Returns</translate>''' (table) <translate>metatable</translate><br/> |
Revision as of 07:30, 24 August 2018
Available since: Gideros 2011.6
Description
If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.
(table) = getmetatable(object)
Parameters
object: (object) Object from which to get metatable
Return values
Returns (table) metatable