SessionList (PersistentObjectInfo function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
==Syntax==
==Syntax==
{{Template:PersistentObjectInfo:SessionList syntax}}
{{Template:PersistentObjectInfo:SessionList syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%persObjList</th><td>An <var>Arraylist of Object PersistentObjectInfo</var> object variable.</td></tr>
<tr><th>%persObjList</th>
<tr><th><var>(PersistentObjectInfo)</var></th>
<td>An <var>Arraylist of Object PersistentObjectInfo</var> object variable.</td></tr>
<td>The class name in parentheses denotes a [[Notation conventions for methods#Shared members|shared]] method. <var>SessionList</var> can also be invoked via a <var>PersistentObjectInfo</var> object variable, which may be <var>Null</var>.</td></tr>
 
<tr><th><var>%(PersistentObjectInfo)</var></th>
<td>The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. <var>SessionList</var> can also be invoked via a <var>PersistentObjectInfo</var> object variable, which may be <var>Null</var>.</td></tr>
 
<tr><th>matchString</th>
<tr><th>matchString</th>
<td>An optional, case-sensitive, pattern-matching string that identifies the name(s) of the session(s) whose information is to be returned to <var class="term">%persObjList</var>. The default if no string is provided is to return information of all sessions.</td></tr>
<td>An optional, case-sensitive, pattern-matching string that identifies the name(s) of the session(s) whose information is to be returned to <var class="term">%persObjList</var>. The default if no string is provided is to return information of all sessions.</td></tr>
Line 14: Line 18:
==Usage notes==
==Usage notes==
<ul>
<ul>
<li><var>SessionList</var>is also a shared method in the <var>[[Object class|Object]]</var> class. This means that both of these statements are valid:
<li><var>SessionList</var> is also a shared method in the <var>[[Object class|Object]]</var> class. This means that both of these statements are valid:
   
   
<p class="code">%persInfoList = %(persistentObjectInfo):sessionlList
<p class="code">%persInfoList = %(persistentObjectInfo):sessionList
   
   
%persInfoList = %(object):sessionList</p>
%persInfoList = %(object):sessionList</p></li>
   
   
<li>As a coding convenience, the <var>PersistentObjectInfoList</var>
<li>As a coding convenience, the <var>PersistentObjectInfoList</var>
Line 26: Line 30:
<p class="code">%persInfoList is type persistentObjectInfoList</p>
<p class="code">%persInfoList is type persistentObjectInfoList</p>


'''Note:''' The keyword <var>Type</var> is required.
<p class="note">'''Note:''' The keyword <var>Type</var> is required.</p></li>


</ul>
</ul>


==Examples==
==Examples==
See the <var>GlobalList</var> [[GlobalList (PersistentObjectInfo function)#Examples|examples]].
The <var>[[GlobalList (PersistentObjectInfo function)|GlobalList]]</var> method is for global objects what the
<var>SessionList</var> method is for session objects. See the <var>GlobalList</var> [[GlobalList (PersistentObjectInfo function)#Examples|examples]].


==See also==
==See also==
{{Template:PersistentObjectInfo:SessionList footer}}
{{Template:PersistentObjectInfo:SessionList footer}}

Latest revision as of 19:13, 27 August 2014

Get list of session objects (PersistentObjectInfo class)

[Introduced in Sirius Mods 7.8]


Syntax

%persObjList = %(PersistentObjectInfo):SessionList[( [matchString])]

Syntax terms

%persObjList An Arraylist of Object PersistentObjectInfo object variable.
%(PersistentObjectInfo) The class name in parentheses denotes a shared method. SessionList can also be invoked via a PersistentObjectInfo object variable, which may be Null.
matchString An optional, case-sensitive, pattern-matching string that identifies the name(s) of the session(s) whose information is to be returned to %persObjList. The default if no string is provided is to return information of all sessions.

Usage notes

  • SessionList is also a shared method in the Object class. This means that both of these statements are valid:

    %persInfoList = %(persistentObjectInfo):sessionList %persInfoList = %(object):sessionList

  • As a coding convenience, the PersistentObjectInfoList type is defined as an "Arraylist of Object PersistentObjectInfo". Consequently, instead of a declaration like this one:

    %persInfoList is arraylist of object persistentObjectInfo

    You can simply specify:

    %persInfoList is type persistentObjectInfoList

    Note: The keyword Type is required.

Examples

The GlobalList method is for global objects what the SessionList method is for session objects. See the GlobalList examples.

See also