CImageSet:Remove


The Remove method removes a CImage from the CImageSet by matching the CImage object to members in the CImageSet.

Syntax

CImageOld = CImageSet:Remove( CImage )

where

    CImage specifies the CImage to remove.

    CImageOld is the CImage object that was removed. If the CImage was not removed, nil is returned.

  

This method finds the member in the list by searching the CImageSet to match the CImage object by value. On success, the CImage argument and the returned member should be equal. The returned value is not a new object, as the CImage object still exists even though it is no longer a member of the CImageSet. Removing the object decreases the set Count by 1 member. Removal does not delete the CImage.

Example

Suppose a CImageSet exists with name S and that it contains 10 CImage objects. The following script removes from the list the CImage I:

Printf("Count=%d", S:Count() )

-- result: count=10

S:Remove( I )

-- remove the CImage I

Printf("Count=%d", S:Count() )

-- result: count=9

Related Topics

RemoveAt

RemoveFirst

RemoveLast

CImageSet class