up Inquisit Language Reference

insertitem function

Inserts the item at the specified index.

Member of

<html>

<list>

<picture>

<port>

<sound>

<text>

<video>

<xid>

Syntax

element.name.insertitem(value, index)

Parameters

Name Type Description
value any The value for the item.
index integer The index where the item is inserted. The first item in the list is 1.

Examples

The following inserts the first item of a text stimulus:

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

The following inserts an item into the middle of the selection pool of a list:

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

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