Variable reference to a list object?

Susan G. Campbell scampbell at casl.umd.edu
Wed Apr 1 19:27:25 UTC 2009


Hi Adam,

I think what you're looking for here (possibly in both posts) is colon notation.  If you want a second picture from the same nested list, you'll want to do [Picture:1] rather than just [Picture] twice.  The number after the colon is the number of the sample you want.  (Because E-Prime was written by programmers, [Picture] and [Picture:0] are the same thing.)

Hope this helps,
Susan

From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Adam Osth
Sent: Wednesday, April 01, 2009 3:14 PM
To: e-prime at googlegroups.com
Subject: Variable reference to a list object?

Hello all,

I have this predicament. I'm running a recognition memory experiment (similar to the StudyRecall example) that is a little bit complicated. I have several lists of stimuli all nested within the Study List.

What we have looks something like this:
StudyList (randomly shuffle)
-Nested category 1
-Nested category 2
- ...
-Nested category 16

Each nested category contains 9 pictures - within the [Picture] attribute is the picture filename.

I need to randomly select 2 pictures from each nested category and get their filenames so I can write them to a recall list.

Now, I can't do context referencing for this. While c.GetAttrib("Picture") will successfully get a picture at the same level, I need to get TWO pictures from the same nested category, and if I jump levels, it will jump to another nested category.

I thought that maybe I could declare a string variable that takes on the category name, so I wrote something like this:

dim CatName As String
CatName = Categories.GetAttrib(counter, "Nested")
RecallList.setAttrib counter, "Stimulus", CatName.GetAttrib(counter, "Picture")
RecallList.setAttrib counter + 1, "Stimulus", CatName.GetAttrib(counter + 1, "Picture")

The only problem is that when I generate the script, it tells me that CatName must be a valid object in order to reference.

Is there any way I can have a variable reference a list object?

Any tips to point me in the right direction would be supremely helpful. Thanks!

Adam


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20090401/d16a811d/attachment.htm>


More information about the Eprime mailing list