Problem with Header

PennController for IBEX Forums Support Problem with Header

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10878
    KateK
    Participant

    I’m having a strange problem that I really can’t quite figure out of. Essentially, the combination of the Header function + the various “default” ones (defaultText, defaultImage, defaultAudio, etc.) doesn’t work properly. To make sure I wasn’t making any mistakes in my own code, I tried to simply import/copy-paste the code from the documentation page of Header (https://doc.pcibex.net/global-commands/header/):

    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()
    )

    Even just this – it simply doesn’t work. What I end up seeing in both trials is just the scale, but not the text – it’s as if the “.print()” instruction never kicks in. In fact, if I add more details to the defaultText (bold, .center(), etc), those also just never apply.

    Interestingly, and even more confusingly, it’s only the “default” commands that don’t get applied through Header. If I add a “newText(…..)” thing *inside* the Header block, that text will in fact get printed in both trials (with the formatting specified inside Header).

    Does this happen to anyone else? Is it a known issue with Header? And if so, is there any other way to kinda set the formatting globally for the whole code instead of repeating various default{…} blocks inside every single Trial type?

    #10882
    Jeremy
    Keymaster

    Hello,

    I apologize for the inconvenience: this is a new bug that was introduced in the version of PennController shipping with the Empty Project. I have fixed the bug in this release of PennController. Please download the file at upload it to your project’s Modules folder, and the Header command should behave properly again

    Jeremy

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.