ClassName (Object function): Difference between revisions
Jump to navigation
Jump to search
m (Automatically generated page update) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Template:Object:ClassName subtitle}} | {{Template:Object:ClassName subtitle}} | ||
This | This function returns the class name of the underlying object. | ||
==Syntax== | ==Syntax== | ||
{{Template:Object:ClassName syntax}} | {{Template:Object:ClassName syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>%string</th><td> | <tr><th>%string</th><td>The class name of the object referenced by <var>object</var>.</td></tr> | ||
<tr><th>object</th> | <tr><th>object</th> | ||
<td>Object object</td></tr> | <td>Object object for which the class name is to be returned.</td></tr> | ||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
<ul> | |||
<li>The class name returned is the class of the object variable assigned to the <var>Object</var> class object variable, not the outermost (highest level extension) class. For example, if a variable <code>%foo is object foo</code> is assigned to variable <code>%obj is object object</code>, <var>%obj:classname</var> would return <code>Foo</code>, even if the underlying object was of class <var>Foobar</var> which extended <var>Foo</var>.</li> | |||
</ul> | |||
==Examples== | ==Examples== | ||
The following displays the class of the object referenced by <var>Object</var> class variable %something:<p class="code">... | |||
%something is object object | |||
... | |||
printText {~=%something:className} | |||
</p> | |||
==See also== | ==See also== | ||
{{Template:Object:ClassName footer}} | {{Template:Object:ClassName footer}} |
Revision as of 04:43, 16 July 2012
Class name of object (Object class)
[Introduced in Sirius Mods 8.1]
This function returns the class name of the underlying object.
Syntax
%string = object:ClassName
Syntax terms
%string | The class name of the object referenced by object. |
---|---|
object | Object object for which the class name is to be returned. |
Usage notes
- The class name returned is the class of the object variable assigned to the Object class object variable, not the outermost (highest level extension) class. For example, if a variable
%foo is object foo
is assigned to variable%obj is object object
, %obj:classname would returnFoo
, even if the underlying object was of class Foobar which extended Foo.
Examples
The following displays the class of the object referenced by Object class variable %something:
... %something is object object ... printText {~=%something:className}