NewFromGlobal (PersistentObjectInfo function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 9: Line 9:
<td>For a shared function, this optional specification of the class in parentheses denotes a [[Notation conventions for methods#Shared methods|virtual constructor]]. See [[#Usage notes|"Usage notes"]], below, for more information about invoking a <var>PersistentObjectInfo</var> virtual constructor.</td></tr>
<td>For a shared function, this optional specification of the class in parentheses denotes a [[Notation conventions for methods#Shared methods|virtual constructor]]. See [[#Usage notes|"Usage notes"]], below, for more information about invoking a <var>PersistentObjectInfo</var> virtual constructor.</td></tr>
<tr><th>string</th>
<tr><th>string</th>
<td>A string that identifies the name of the global variable whose information is returned to <var class="term">%persObjList</var>.</td></tr>
<td>A string that identifies the name of the global variable whose information is returned to <var class="term">%persObjInfo</var>.</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>As described in [[Object variables#Virtual Constructor methods|"Virtual Constructor methods"]], <var>IsNull</var> and <var>IsNotNull</var> can be invoked with
<li>As described in [[Object variables#Virtual Constructor methods|"Virtual Constructor methods"]], <var>NewFromGlobal</var> can be invoked with
no method object, with an explicit class specification, or with an object variable of the class,
no method object, with an explicit class specification, or with an object variable of the class,
even if that object is <var>Null</var>:
even if that object is <var>Null</var>:
<p class="code">%selCrit = IsNull
<p class="code">%persObjInf = NewFromGlobal('PART')


%selCrit = %(SelectionCriterion for float):IsNotNull
%persObjInf = %(PersistentObjectInfo):NewFromGlobal('PART')


%selCrit = %selCrit:IsNull
%persObjInf = %persObjInf:NewFromGlobal('PART')
</p>
</p>
'''Note:'''
As shown in the second of these above, if you explicitly specify the
class name, you must include the item datatype of the collection to be searched, just as on a <var>SelectionCriterion</var> object variable's [[SelectionCriterion class#Declaring a SelectionCriterion object variable|declaration]].
</ul>
</ul>


==Usage notes==
==Examples==
==Examples==
==See also==
==See also==
{{Template:PersistentObjectInfo:NewFromGlobal footer}}
{{Template:PersistentObjectInfo:NewFromGlobal footer}}

Revision as of 01:22, 23 August 2011

Get info about global object (PersistentObjectInfo class)

[Introduced in Sirius Mods 7.8]


Syntax

%persObjInfo = [%(PersistentObjectInfo):]NewFromGlobal( name)

Syntax terms

%persObjInfoA PersistentObjectInfo object variable.
[(PersistentObjectInfo)] For a shared function, this optional specification of the class in parentheses denotes a virtual constructor. See "Usage notes", below, for more information about invoking a PersistentObjectInfo virtual constructor.
string A string that identifies the name of the global variable whose information is returned to %persObjInfo.

Usage notes

  • As described in "Virtual Constructor methods", NewFromGlobal can be invoked with no method object, with an explicit class specification, or with an object variable of the class, even if that object is Null:

    %persObjInf = NewFromGlobal('PART') %persObjInf = %(PersistentObjectInfo):NewFromGlobal('PART') %persObjInf = %persObjInf:NewFromGlobal('PART')

Examples

See also