problem with a summation object

Michiel Sovijarvi-Spape mspape at cognitology.eu
Thu Mar 1 15:55:12 UTC 2012


Hi,
Correct me if I'm wrong, anyone knowing better and actually having E-Prime
on their desktop (anyone here at Aalto or Helsinki Uni anyway?), but, as far
as I remember:
"Dim SummationAcc, SummationRT as Summation" is interpreted as 
Dim SummationAcc as Variant
Dim SummationRT as Summation
...variant being that weird basic type which changes from integer to string
to double on the basis of its value. A summation object, however, is not a
type but a separate class.
I agree with you that it would be more convenient if e-prime would either
accept various type declarations in one line (double A, B, C etc all being
doubles), or actually give a warning. Although you might say this is just
being punishing for lazy coding, I have met academics enough who had this
problem. It reminds me somewhat of this fascinating thing in flash
actionscript, where
IF x = 3 THEN .... 
is interpreted as "if it's fine to store the value of 3 in the variable x
then continue", so that you get no error message, but your code will start
exhibiting very strange behaviour (since if x = 3, it will continue, but
also if x happens to be 4, x = 3 still is evaluated as "true": the laziness
here was with me and doing too much basic, for not seeing the proper code IF
x == 3 THEN)

Anyway.
Best,
Mich

-----Original Message-----
From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf
Of Maria
Sent: 01 March 2012 17:28
To: E-Prime
Subject: Re: problem with a summation object

Hallo David,

the error occurued in the line where the observation should be added.
I deleted this thread because I found the mistake:

When you define the summation objects you have to write them into
seperate lines like:

Dim SummationAcc as Summation
Dim SummationRT as Summation

and not like:

Dim SummationAcc, SummationRT as Summation

I do not have an explanation for this...




On 28 Feb., 17:49, David McFarlane <mcfar... at msu.edu> wrote:
> Max,
>
> Hmm, another question that could go to PST Web Support
athttp://support.pstnet.com/e%2Dprime/support/login.asp.  Anyway, what
> was the exact line of code that produced the error?  Typically, an
> "Object does not have a default value" error occurs when you use an
> object but fail to specify which *property* of the object you
> mean.  You can get away with that only when the object does have a
> default property, otherwise you must explicitly specify which
> property you mean.
>
> To take a contrived example, the following will create such an error:
>
>      SummationRTA.AddObservation CInt(ReactionInterval)
>
> whereas the following will not:
>
>      SummationRTA.AddObservation CInt(ReactionInterval.RT)
>
> -- David McFarlane
>
> At 2/2/2012 06:02 AM Thursday, you wrote:
>
> >Dear everyone,
>
> >I tried to use a summation object to give feedback to experimental
> >subjects about their accuracy and reaction times.
> >I used following code:
> >Dim SummationAccA, SummationAccB, SummationRTA, SummationRTB as
> >Summation
> >(global variables)
>
> >Set SummationAccA = New Summation
> >Set SummationRTA = New Summation
> >Set SummationAccB = New Summation
> >Set SummationRTB = New Summation
> >(before running the list)
>
> >SummationAccA.AddObservation ReactionInterval.ACC
> >SummationRTA.AddObservation ReactionInterval.RT
> >SummationAccB.AddObservation ReactionInterval2.ACC
> >SummationRTB.AddObservation ReactionInterval2.RT
> >(ReactionInterval & Reactioninterval2 are slide objects)
>
> >By attempting to add the accuracies and reaction times following error
> >occurs:
> >"Object does not have a default value"
>
> >I used the same principle in further experiments and there it worked.
> >I hope there is just a simple mistake, thanks for answers,
> >best regards,
> >Max

-- 
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.


-- 
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.



More information about the Eprime mailing list