Removes an item from the list.
none
Name | Type | Description |
---|---|---|
index | integer | The index of the item to remove. The first item in the list is 1. |
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.
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>