Copy (Stringlist function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
Line 1: | Line 1: | ||
{{Template:Stringlist:Copy subtitle}} | {{Template:Stringlist:Copy subtitle}} | ||
This method copies an entire Stringlist, creating a new Stringlist. The Copy method accepts no argument and returns a Stringlist object. If you are new to object-oriented programming or the Janus APIs you should read about [[Copying objects]]. | This method copies an entire <var>Stringlist</var>, creating a new <var>Stringlist</var>. The Copy method accepts no argument and returns a <var>Stringlist</var> object. If you are new to object-oriented programming or the Janus APIs you should read about [[Copying objects]]. | ||
==Syntax== | ==Syntax== | ||
Line 8: | Line 8: | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>%outlist</th> | <tr><th>%outlist</th> | ||
<td>A Stringlist to contain the copy of the method Stringlist '''%sl'''</td></tr> | <td>A <var>Stringlist</var> to contain the copy of the method <var>Stringlist</var> '''%sl'''</td></tr> | ||
<tr><th>sl</th> | <tr><th>sl</th> | ||
<td>A Stringlist object.</td></tr> | <td>A <var>Stringlist</var> object.</td></tr> | ||
</table> | </table> | ||
Line 16: | Line 16: | ||
<ul> | <ul> | ||
<li>All errors in Copy result in request cancellation. | <li>All errors in Copy result in request cancellation. | ||
<li>If the method Stringlist was associated with an image, by either the BindImage or New method, the output Stringlist is associated with the same image, as if a BindImage method had been invoked on the result of the Copy method.<li>Copy does a page-for-page copy of the input Stringlist. As such, it is very efficient (more efficient than CopyItems), but it is also useless for compressing a Stringlist that has become sparse as the result of heavy Insert, Replace, ChangeItemLength, and RemoveItem activity. Replace and ChangeItemLength cause a Stringlist to become sparse only if Stringlist items are replaced with larger Stringlist items or increased in size. For list compression, use [[CopyItems (Stringlist function)]]. | <li>If the method <var>Stringlist</var> was associated with an image, by either the BindImage or New method, the output <var>Stringlist</var> is associated with the same image, as if a BindImage method had been invoked on the result of the Copy method.<li>Copy does a page-for-page copy of the input <var>Stringlist</var>. As such, it is very efficient (more efficient than CopyItems), but it is also useless for compressing a <var>Stringlist</var> that has become sparse as the result of heavy Insert, Replace, ChangeItemLength, and RemoveItem activity. Replace and ChangeItemLength cause a <var>Stringlist</var> to become sparse only if <var>Stringlist</var> items are replaced with larger <var>Stringlist</var> items or increased in size. For list compression, use [[CopyItems (Stringlist function)]]. | ||
</ul> | </ul> | ||
[[Category:Stringlist methods|Copy function]] | [[Category:Stringlist methods|Copy function]] |
Revision as of 21:33, 18 January 2011
Copy Stringlist (Stringlist class)
This method copies an entire Stringlist, creating a new Stringlist. The Copy method accepts no argument and returns a Stringlist object. If you are new to object-oriented programming or the Janus APIs you should read about Copying objects.
Syntax
%outList = sl:Copy
Syntax terms
%outlist | A Stringlist to contain the copy of the method Stringlist %sl |
---|---|
sl | A Stringlist object. |
Usage notes
- All errors in Copy result in request cancellation.
- If the method Stringlist was associated with an image, by either the BindImage or New method, the output Stringlist is associated with the same image, as if a BindImage method had been invoked on the result of the Copy method.
- Copy does a page-for-page copy of the input Stringlist. As such, it is very efficient (more efficient than CopyItems), but it is also useless for compressing a Stringlist that has become sparse as the result of heavy Insert, Replace, ChangeItemLength, and RemoveItem activity. Replace and ChangeItemLength cause a Stringlist to become sparse only if Stringlist items are replaced with larger Stringlist items or increased in size. For list compression, use CopyItems (Stringlist function).