New (SortedRecordset constructor): Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 13: | Line 13: | ||
<td>A declared <var>SortedRecordset</var> object including its file/group context. | <td>A declared <var>SortedRecordset</var> object including its file/group context. | ||
</td></tr> | </td></tr> | ||
<tr><th nowrap="true"><var>[%(SortedRecordset In <i>filOrGrp name< | <tr><th nowrap="true"><var>[%(SortedRecordset In <i>filOrGrp name<var>)]</var></th> | ||
<td>The optional class name in parentheses denotes a <var>[[Notation conventions for methods#Constructors|Constructor]]</var>. See [[#Usage notes|"Usage notes"]], below, for more information about invoking a <var>SortedRecordset</var> <var>Constructor</var>. | <td>The optional class name in parentheses denotes a <var>[[Notation conventions for methods#Constructors|Constructor]]</var>. See [[#Usage notes|"Usage notes"]], below, for more information about invoking a <var>SortedRecordset</var> <var>Constructor</var>. | ||
</td></tr></table> | </td></tr></table> |
Revision as of 18:27, 24 August 2011
Create a new SortedRecordset object (SortedRecordset class)
This Constructor instantiates an empty instance of a SortedRecordset object.
Available as of Sirius Mods version 7.6, the New method is an alternative to using a Sort statement factory constructor, as described in "Declaration and instantiation".
Syntax
%sortedRecordset = [%(SortedRecordset In filOrGrp name):]New
Syntax terms
%sortedRecordset | A declared SortedRecordset object including its file/group context. |
---|---|
[%(SortedRecordset In filOrGrp name)] | The optional class name in parentheses denotes a Constructor. See "Usage notes", below, for more information about invoking a SortedRecordset Constructor. |
Usage notes
- As described in "Using New or other Constructors", New can be invoked with no object, with an explicit class specification, or with an object variable in the class, even if that object is Null:
%srecs = new %srecs = %(SortedRecordset in file sirLocal):new %srecs = %srecs:new
Note: As shown above, when explicitly indicating the class, both the class name and the file or group context must be specified just as they are on the SortedRecordset variable's declaration.
- If you are creating an extension class of the SortedRecordset class,
you can use New in the Construct statement in the extension class:
class sordidSet extends sortedRecordset in sordid inherit ... constructor new construct %(sortedRecordset in sordid):new ... end constructor ... end class
The Sort statement constructors cannot be used for this purpose.
Example
- The New constructor has no parameters and simply
instantiates an empty instance of its class:
%srs is object SortedRecordset in sordid ... %srs = new