GetImage (Stringlist subroutine)

From m204wiki
Revision as of 13:58, 24 November 2010 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Retrieve Stringlist item into image

This method copies data from a specified Stringlist item to an image.

GetImage is a member of the Stringlist class.

GetImage Syntax

%sl:GetImage(itemnum, imagename)

Syntax Terms

%sl
A Stringlist object.
itemnum
The number of the item in the Stringlist.
imagename
A string that contains the name of an image. This is an optional argument if an image has been associated with the Stringlist with a BindImage method (BindImage (Stringlist function). Otherwise, it is a required argument. This argument is case sensitive. That is, in the likely event the User Language was written in mixed case, with automatic uppercasing in effect (see Mixed-case User Language, the image name should be in uppercase.

Usage Notes

  • All errors in GetImage result in request cancellation.
  • One way to extract a Stringlist item into an image (called Headstone, below) is as follows:
    %list:getImage(%n, 'HEADSTONE')
    

    Here is a neater and more efficient way of doing this:

    %list:bindImage('HEADSTONE')
    . . . . . .
    %list:getImage(%n)
    

    In this last example, the BindImage (Stringlist function) associates the image with the Stringlist, eliminating the need to specify the image name on the GetImage.