Jumps, labels and input masks
Brandon Cernicky
brandon_cernicky at yahoo.com
Fri Apr 7 12:31:23 UTC 2006
Hi Rachel,
E-Prime allows for jumping to occur by throwing a
runtime error -998 "Input Accepted". The Label object
generates code which sets up an E-Basic error handler
to trap the "Input Accepted" runtime error when a jump
occurs so that the experiment can continue properly.
If any other error occurs (see below), the error
handler from the Label is not able to handle this and
just throws/raises the error again. Thus you get the
"application defined" error.
Ultimately, another runtime error is occuring. Many
times this is in regards to an object referencing an
[attrib] value that doesn't exist.
To find out what the error is, you can do one of the
following:
1) Instead of using the Label, drop the following code
below in an InLine. This inline generates the exact
same code a Label does with the exception of the
.Raise call providing more information which will show
what the verbose error is. It will not indicate where
the error occurs, but if the error is "[Stimulus1]
cannot be resolved" then you can narrow it down.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Label - Label1 BEGIN
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Label1:
If Err.Number = ebInputAccepted Then
Err.Clear
Resume Label1Resume
ElseIf Err.Number <> 0 Then
'NOTE: If you receive a runtime error here, it
' is because a runtime error other than
ebInputAccepted
' was thrown (ebInputAccepted for catching input
masks that jump).
'You are encouraged to either handle the error so
that
' it is not thrown in the future or will have to set
up
' your own error handler, which will also need to
take
' into account for any input masks that jump.
'
'Raise the error so the default error handler will
show the message
Err.Raise Err.Number, Err.Source, Err.Description
End If
Label1Resume:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Label - Label1 END
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
On Error GoTo 0
2) Use the Label object in E-Prime 1.2 (soon to be
released) which generates the code above in the Label.
3) Remove your label and reference to the label in the
text/slide object. This will tempoarily not permit
your intended execution of the paradigm to occur, but
w/o the error handlers being in there, the outside
error will be handled by the default error handler and
more verbose information and where it is occurring can
be obtained.
4) Attach your experiment to a Web Support ticket in
E-Prime Web Support and one of the tech consultants
will be happy to assist.
Another item that must be mentioned is that error
handlers whether done through the Label object or in
custom InLine are set from the time the "On Error"
call is executed until the next time an "On Error" is
executed again or the procedure ends. This means that
if a runtime error occurs AFTER your label it will
jump BACKWARDS.
This can be remedied by placing On Error GoTo 0 in an
InLine just after your label or by setting up another
Label object and setting its name in the
Duration/Input tab of an object that appears after the
original label.
-Brandon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brandon S. Cernicky
Senior Software Engineer
Psychology Software Tools
>> Hello all
>>
>> I keep getting an error when trying to run my
programme and I don't know why
>> it is occurring and what I need to do about it.
>>
>> In summary, in my paradigm participants see a
series of increasingly intense
>> facial emotion pictures 0, 25%, 50%, 75%, 100% and
so on).
>> Participants have to press a response key as soon
as they've decided what
>> emotion is emerging.
>> It works fine, apart from when participants don't
make a response for that
>> trial/series.
>> Then I get this error message......
>> Run-time Error (Line 830)
>> 11016: Application-defined or object-defined error
>>
>> And the script box highlights....
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Eprime
mailing list