CImageSet:Remove CImageSet:RemoveFirst

CImageSet:RemoveAt


The RemoveAt method removes a CImage from the list by its index position in the set.

Syntax

CImage = CImageSet:RemoveAt( position )

    position specifies the removal point (see Remarks)

    On success, the CImage that was removed is returned.

    On failure, nil is returned.

Remarks

Removing a list member decreases the set Count by 1 member. Removal does not delete the CImage or its associated image.

Example

Suppose a CImageSet exists with name S and that it contains 10 images. The following script fragment removes from the list the CImage object at index 5:

 

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

-- result: count=10

S:RemoveAt( 5 )

-- remove the member at index 5

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

-- result: count=9

Related Topics

CImageSet, RemoveFirst, RemoveLast, Remove, CImage