(PennController.)Header
description
Will evaluate and run sequenceOfCommands
at the beginning of each trial created with PennController
.
syntax
(PennController.)Header(sequenceOfCommands)
↳ What does (PennController.)
mean?
-
sequenceOfCommands
:
notes
- Note that
default
commands are immediately evaluated (rather than evaluating upon running). As a consequence, anydefault
command will only have an effect on PennController trials defined after the Header has been set.
since
beta 0.3example(s)
@
$Header(
$ defaultText
$ .print()
$)
@
@newTrial(
@ newText("test sentence", "The cat is chasing the mouse")
@ ,
@ newText("instructions", "How natural is this sentence?")
@ ,
@ newScale("natural", 5)
@ .slider()
@ .before( newText("left", "Unnatural") )
@ .after( newText("right", "Natural") )
@ .print()
@ .wait()
@)
@
@newTrial(
@ newText("test sentence", "The mouse is being chased by the cat")
@ ,
@ newText("instructions", "How natural is this sentence?")
@ ,
@ newScale("natural", 5)
@ .slider()
@ .before( newText("left", "Unnatural") )
@ .after( newText("right", "Natural") )
@ .print()
@ .wait()
@)
-
Though no
print
command explicitly appears in the trials themselves, the Text elements will be printed onto the page because the header definesprint
as a default command for all Text elements.