up Inquisit Language Reference

setitem function

Sets the item at the specified index.

Member of

<list>

<picture>

<port>

<sound>

<text>

<video>

<xid>

Syntax

element.name.setitem(value, index)

Parameters

Name Type Description
value any The new value for the item.
index integer The index of the item to set. The first item in the list is 1.

Examples

The following sets the first item of a text stimulus:

<trial sometrial>
/ ontrialend= [text.sometext.setitem("Hello world!", 1);]
</trial>

The following sets the last item of the selection pool of a list:

<trial sometrial>
/ ontrialend= [list.mylist.setitem(values.newvalue, list.mylist.itemcount);]
</trial>

Send comments on this topic:
Copyright Millisecond Software, LLC. All rights reserved.