Context Attributes in If..Then

Mark G Orr morrct at andrew.cmu.edu
Fri May 30 21:12:13 UTC 2003


Thanks, that works.

On Fri, 30 May 2003, Susan Campbell wrote:

> Have you tried using this?
> If Collection.RESP = "j" then
> ...
>
> Sometimes the context attribute and the variable are different (for
> various reasons I don't understand) and I noticed that you use
> Collection.RESP in the first line instead of
> c.GetAttrib("Collection.RESP"), which seems to work.  I have used a
> similar procedure (checking for a particular response with 'if blah.RESP
> = "J" then') and it worked fine.
>
> Hope this helps,
> Susan
>
> *** DISCLAIMER: ALL VIEWS EXPRESSED ARE MY OWN AND DO NOT NECESSARILY
> REFLECT THOSE OF PSYCHOLOGY SOFTWARE TOOLS ***
>
> > -----Original Message-----
> > From: Mark G Orr [mailto:morrct at andrew.cmu.edu]
> > Sent: Friday, May 30, 2003 3:57 PM
> > To: eprime at mail.talkbank.org
> > Subject: Context Attributes in If..Then
> >
> >
> > Hello, I have been struggling with the following problem all day:
> >
> > I have a text object, called "Collection", which logs a
> > keyboard response.
> > For each trial, I want to change a global variable's value
> > based on the
> > subjects respone.  I attempted the following test code to see
> > if I could
> > use the Collection.RESP in an If..Then statement (the line numbers are
> > not in the real code):
> >
> > <begin code>
> >
> > 1 Debug.Print Collection.RESP
> > 2
> > 3 If c.GetAttrib("Collection.RESP") = "j" Then
> > 4	Debug.Print "J"
> > 5   Else
> > 6	Debug.Print "else"
> > 7 End If
> >
> >
> > <end of code>
> >
> >
> > So, the debugger correctly prints Collection.RESP in line 1.  However,
> > when Colletion.RESP is = to j, the If..Then statement still
> > jumps to line
> > 5, thus debug printing "else".
> >
> > My hunch is that using c.GetAttrib("Collection.RESP") = "j"
> > on line 3 is
> > not the correct way to enter this info into the If..Then statement.
> >
> > ANy ideas.
> >
> > THanks.
> >
> >
> > Mark Orr
> >
> >
>
>



More information about the Eprime mailing list