Link Search Menu Expand Document

(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, any default command will only have an effect on PennController trials defined after the Header has been set.

since

beta 0.3

example(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 defines print as a default command for all Text elements.