Difference between revisions of "Object:isInstanceOf"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2015.08<br/>
 
'''Available since:''' Gideros 2015.08<br/>
 +
'''Class:''' [[Object]]<br/>
 +
 
=== Description ===
 
=== Description ===
<translate>Returns true if instance is of provided class name or if it inherits from provided class name</translate>
+
Returns true if instance is of provided class name or if it inherits from provided class name.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(boolean) = Object:isInstanceOf(classname)
 
(boolean) = Object:isInstanceOf(classname)
</source>
+
</syntaxhighlight>
 +
 
 
=== Parameters ===
 
=== Parameters ===
'''classname''': (string) <translate>The name of the class to check relation to</translate> <br/>
+
'''classname''': (string) the name of the class to check relation to <br/>
 +
 
 
=== Return values ===
 
=== Return values ===
'''Returns''' (boolean) <translate>true if instance belongs or inherits from class, false otherwise</translate><br/>
+
'''Returns''' (boolean) true if instance belongs or inherits from class, false otherwise<br/>
 +
 
 +
{{Object}}

Latest revision as of 14:32, 13 July 2023

Available since: Gideros 2015.08
Class: Object

Description

Returns true if instance is of provided class name or if it inherits from provided class name.

(boolean) = Object:isInstanceOf(classname)

Parameters

classname: (string) the name of the class to check relation to

Return values

Returns (boolean) true if instance belongs or inherits from class, false otherwise