up Inquisit Language Reference

removeItem function

Removes an item from the list.

Member of

<item><list><html><picture><port><sound><text><video><xid>

Syntax

object.name.removeItem(index)

Return Type

none

Parameters

Name Type Description
index integer The index of the item to remove. The first item in the list is 1.

Remarks

The removeItem function removes the item at the specified index from an element's list of items. When called on a list element, for example, the function removes an item from the selection pool. When called from a stimulus element, a stimulus item is removed.

Examples

The following removes the first item from a text stimulus:

<trial myTrial>
/ onTrialEnd= [text.myText.removeItem(1);]
</trial>

The following removes the last item from the selection pool of a list:

<trial myTrial>
/ onTrialEnd= [list.mylist.removeItem(list.mylist.itemCount);]
</trial>

Copyright Millisecond Software, LLC. All rights reserved.