New (Stringlist constructor): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (syntax digram, tags and links) |
||
Line 4: | Line 4: | ||
<var>New</var> is a constructor and as such can be called with no object, with an explicit class name, or with an object variable, even if that object is null: | <var>New</var> is a constructor and as such can be called with no object, with an explicit class name, or with an object variable, even if that object is null: | ||
<p class="code">%sl = new | |||
%sl = %(Stringlist):new | |||
%sl = %sl:new | |||
</p> | |||
==Syntax== | ==Syntax== | ||
Line 12: | Line 17: | ||
<td>A <var>Stringlist</var> object that is set to a new <var>Stringlist</var> object reference. </td></tr> | <td>A <var>Stringlist</var> object that is set to a new <var>Stringlist</var> object reference. </td></tr> | ||
<tr><th>imagename</th> | <tr><th>imagename</th> | ||
<td> | <td>An, optional, string that contains the name of an image to be "associated" or "bound" to the <var>sl</var> <var>Stringlist</var>. This is an optional argument. ''This argument is case sensitive''. That is, in the likely event the User Language was written in mixed case, with automatic upper-casing in effect, the image name should be in uppercase (see [[Mixed-case User Language]]).</td></tr> | ||
</table> | </table> | ||
Line 18: | Line 23: | ||
<ul> | <ul> | ||
<li>All errors in <var>New</var> result in request cancellation. | <li>All errors in <var>New</var> result in request cancellation. | ||
<li>Specifying an image name on the <var>New</var> method is identical to using a simple <var>New</var> with no parameters followed by a BindImage method on the new object: | <li>Specifying an image name on the <var>New</var> method is identical to using a simple <var>New</var> with no parameters followed by a <var>[[BindImage (Stringlist subroutine)|BindImage]]</var> method on the new object: | ||
<p class="code">%list = new('IMAGENAME') | <p class="code">%list = new('IMAGENAME') | ||
Line 29: | Line 34: | ||
</p> | </p> | ||
For more information about the association or binding of an image to a <var>Stringlist</var>, see [[ | For more information about the association or binding of an image to a <var>Stringlist</var>, see <var>[[BindImage (Stringlist subroutine)|BindImage]]</var>.</ul> | ||
[[Category:Stringlist methods|New constructor]] | [[Category:Stringlist methods|New constructor]] |
Revision as of 08:45, 26 January 2011
Create new Stringlist instance (Stringlist class)
This method returns a new instance of a Stringlist.
New is a constructor and as such can be called with no object, with an explicit class name, or with an object variable, even if that object is null:
%sl = new %sl = %(Stringlist):new %sl = %sl:new
Syntax
%sl = [%(Stringlist):]New[( [imageName])]
Syntax terms
%sl | A Stringlist object that is set to a new Stringlist object reference. |
---|---|
imagename | An, optional, string that contains the name of an image to be "associated" or "bound" to the sl Stringlist. This is an optional argument. This argument is case sensitive. That is, in the likely event the User Language was written in mixed case, with automatic upper-casing in effect, the image name should be in uppercase (see Mixed-case User Language). |
Usage notes
- All errors in New result in request cancellation.
- Specifying an image name on the New method is identical to using a simple New with no parameters followed by a BindImage method on the new object:
%list = new('IMAGENAME')
is equivalent to
%list = new %list:bindImage('IMAGENAME')
For more information about the association or binding of an image to a Stringlist, see BindImage.