Lists


Author
Message
Nick Riches
Nick Riches
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 19, Visits: 69
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>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
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.

Nick Riches
Nick Riches
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 19, Visits: 69
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...

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search