Millisecond Forums

Lists

https://forums.millisecond.com/Topic23923.aspx

By Nick Riches - 2/26/2018

Hi

I'm really confused about how to use 'lists'. I've tried to create a Minimal Worked Example below. I thought the aim of the 'list' element was to create a general-purpose class for storing any type of item. However, I can't seem to refer to the wordList in the wordText element. Can anyone help with this?

Thanks

Nick


<list wordList>
/ items = ("dog", "cat")
/ select = sequence
</list>

<list responseList>
/ items = ("Y", "N")
/ selectionmode = list.wordlist.currentindex
</list>

<text wordText>
/ items = list.wordList.item
/ select = sequence
</text>

<trial wordTrial>
/ stimulusframes = [1 = wordText]
/ response = list.responseList.item
</trial>

<block wordBlock>
/ trials = [1-2 = wordTrial]
</block>

<expt exptBlock>
/ blocks = [1 = wordBlock]
</expt>

By Dave - 2/27/2018

Nick Riches - Tuesday, February 27, 2018
Hi

I'm really confused about how to use 'lists'. I've tried to create a Minimal Worked Example below. I thought the aim of the 'list' element was to create a general-purpose class for storing any type of item. However, I can't seem to refer to the wordList in the wordText element. Can anyone help with this?

Thanks

Nick


<list wordList>
/ items = ("dog", "cat")
/ select = sequence
</list>

<list responseList>
/ items = ("Y", "N")
/ selectionmode = list.wordlist.currentindex
</list>

<text wordText>
/ items = list.wordList.item
/ select = sequence
</text>

<trial wordTrial>
/ stimulusframes = [1 = wordText]
/ response = list.responseList.item
</trial>

<block wordBlock>
/ trials = [1-2 = wordTrial]
</block>

<expt exptBlock>
/ blocks = [1 = wordBlock]
</expt>


No, <list>s aren't for storing items per se, but rather a general purpose construct to store numerical values, or other objects -- like <text>, <trial> or <block> elements -- for selection. What you are looking for  in your example is the <item> element, i.e. you'll want to do

<text wordText>
/ items = worditems
/ select = sequence
</text>

<item worditems>
/ 1 = "yes"
/ 2 = "no"
</item>

Apart from that

<text wordText>
/ items = list.wordList.item
/ select = sequence
</text>

is wrong and would not return anything anyway.
By Nick Riches - 2/27/2018

Dave - Tuesday, February 27, 2018
Nick Riches - Tuesday, February 27, 2018
Hi

I'm really confused about how to use 'lists'. I've tried to create a Minimal Worked Example below. I thought the aim of the 'list' element was to create a general-purpose class for storing any type of item. However, I can't seem to refer to the wordList in the wordText element. Can anyone help with this?

Thanks

Nick


<list wordList>
/ items = ("dog", "cat")
/ select = sequence
</list>

<list responseList>
/ items = ("Y", "N")
/ selectionmode = list.wordlist.currentindex
</list>

<text wordText>
/ items = list.wordList.item
/ select = sequence
</text>

<trial wordTrial>
/ stimulusframes = [1 = wordText]
/ response = list.responseList.item
</trial>

<block wordBlock>
/ trials = [1-2 = wordTrial]
</block>

<expt exptBlock>
/ blocks = [1 = wordBlock]
</expt>


No, <list>s aren't for storing items per se, but rather a general purpose construct to store numerical values, or other objects -- like <text>, <trial> or <block> elements -- for selection. What you are looking for  in your example is the <item> element, i.e. you'll want to do

<text wordText>
/ items = worditems
/ select = sequence
</text>

<item worditems>
/ 1 = "yes"
/ 2 = "no"
</item>

Apart from that

<text wordText>
/ items = list.wordList.item
/ select = sequence
</text>

is wrong and would not return anything anyway.

Thanks. I'm kind of getting there...