Access entire content of list element?


Author
Message
AKrishna
AKrishna
Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)
Group: Forum Members
Posts: 118, Visits: 396
Hi all,

I was just wondering if there's any way to access the entire content of a list element. For example, if I have a list:
<list MyList>
/items = ("ham","eggs")
</list>

...is there any way to get Inquisit to make something like "ham, eggs" accessible (e.g., for writing in data via values) WITHOUT needing to access the list elements "by hand" (i.e. without list.MyList.item(1))?

The background for this question is that I'm programming an experiment where I'm mapping word colors to (two distinct) response categories and I want to assign the word colors to the response categories randomly for each participant at experiment start. However, I also need to record which colors are associated with which response category in the data file, and I'm unsure how many colors we'll end up using per category. So I'm trying to program the script flexibly such that my collaborators can just enter any number of colors in a master list at the top of the script and the experiment script will a) divide those colors into two response categories per participant and b) record which color ended up where per participant.

I'm managing a) by using a trialduration = 0 trial that pulls one color from the master list and adds it to the first response category list, then loops until the number of items in the response category list is at least half the number of items in the master list before doing a similar loop to fill the second response category list. But b) is causing me some trouble - I can't dynamically add columns to my <data> element as far as I'm aware, so I need to somehow record the entire list contents of a list with an indeterminate number of elements. Is this possible or am I reaching too far here?

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search