Difference between revisions of "Object"
From GiderosMobile
| Line 2: | Line 2: | ||
| '''Supported platforms:''' <br/> | '''Supported platforms:''' <br/> | ||
| '''Available since:''' Gideros 2015.08<br/> | '''Available since:''' Gideros 2015.08<br/> | ||
| − | === Description === | + | === <translate>Description</translate> === | 
| <translate>Main Object class from which all Gideros classes inherit.<br/> | <translate>Main Object class from which all Gideros classes inherit.<br/> | ||
| There is no other purpose for this classes, rather a neat way to add methods to all Gideros classes</translate> | There is no other purpose for this classes, rather a neat way to add methods to all Gideros classes</translate> | ||
| − | === Examples === | + | === <translate>Examples</translate> === | 
| '''Example usage'''<br/> | '''Example usage'''<br/> | ||
| <source lang="lua">local bmp = Bitmap.new("image.png") | <source lang="lua">local bmp = Bitmap.new("image.png") | ||
| Line 17: | Line 17: | ||
| {|- | {|- | ||
| | style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
| − | === Methods === | + | === <translate>Methods</translate> === | 
| [[Special:MyLanguage/Object:getBaseClass|Object:getBaseClass]] ''<translate>returns base class</translate>''<br/> | [[Special:MyLanguage/Object:getBaseClass|Object:getBaseClass]] ''<translate>returns base class</translate>''<br/> | ||
| [[Special:MyLanguage/Object:getClass|Object:getClass]] ''<translate>returns class name</translate>''<br/> | [[Special:MyLanguage/Object:getClass|Object:getClass]] ''<translate>returns class name</translate>''<br/> | ||
| [[Special:MyLanguage/Object:isInstanceOf|Object:isInstanceOf]] ''<translate>checks if instance belongs to class</translate>''<br/> | [[Special:MyLanguage/Object:isInstanceOf|Object:isInstanceOf]] ''<translate>checks if instance belongs to class</translate>''<br/> | ||
| | style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
| − | === Events === | + | === <translate>Events</translate> === | 
| − | === Constants === | + | === <translate>Constants</translate> === | 
| |} | |} | ||
Revision as of 07:27, 24 August 2018
Supported platforms: 
Available since: Gideros 2015.08
Description
Main Object class from which all Gideros classes inherit.
There is no other purpose for this classes, rather a neat way to add methods to all Gideros classes
Examples
Example usage
local bmp = Bitmap.new("image.png")
print(bmp:getClass()) -- prints Bitmap
print(bmp:getBaseClass()) -- prints Sprite
print(bmp:isInstanceOf("Bitmap")) -- prints true
print(bmp:isInstanceOf("Sprite")) -- prints true
print(bmp:isInstanceOf("EventDispatcher")) -- prints true
print(bmp:isInstanceOf("Object")) -- prints true
print(bmp:isInstanceOf("TileMap")) -- prints false
| MethodsObject:getBaseClass returns base class | EventsConstants | 
