Var shufflesequence from Spreadsheet

Home Forums Support Var shufflesequence from Spreadsheet

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1804
    Matthew Hunt
    Guest

    Hi again,

    I am trying to run a simple scale experiment through a spreadsheet. It has 2 lines of dialogue. The first is always the same then the second is fed from the spreadsheet. The beginning of my code looks like this:

    var shuffleSequence = seq(randomize(“Sentence”);
    PennController.ResetPrefix(null);
    PennController.Template(

    row => PennController(
    newText(“left label”, “uneducated”)
    ,
    newText(“right label”, “educated”)
    ,
    newText( “question”, ” P1: I just got promoted at work”)
    .settings.italic()
    .settings.center()
    .print()
    ,
    newText( “Sentence” , row.Sentence )
    .settings.italic()
    .settings.center()
    .print()
    ,

    ——————-

    This is followed by a question and a scale of 1-7. It all works fine without the top line (starting var), but when I add that to randomise the sentence from the spreadsheet it says ‘ERROR: There must be some items in the running order!’ when I run the exp. Any ideas?

    Best,

    Matthew

    #1805
    Jeremy
    Keymaster

    Hi again,

    It looks like the problem is coming from a missing closing parenthesis in your first line. The bit of code you pasted has this line: var shuffleSequence = seq(randomize("Sentence"); when it should be var shuffleSequence = seq(randomize("Sentence")); (note the two closing parentheses)

    (Also, I see you don’t define a “Sentence” label as the first argument of your PennController() command—is it intentional? You need some trials labeled “Sentence” if that’s your definition of shuffleSequence)

    • This reply was modified 5 years, 5 months ago by Jeremy. Reason: better tagging
    • This reply was modified 5 years, 5 months ago by Jeremy.
    • This reply was modified 5 years, 5 months ago by Jeremy. Reason: Previous message partly replaced with cache version
    #1857
    Matthew Hunt
    Guest

    Hi Jeremy,

    Thanks a lot. I ended up with the following which worked (where “1” is a column in my spreadsheet):

    PennController.Sequence( randomize(“1”) );
    PennController.ResetPrefix(null);
    PennController.AddHost(“http://files.lab.florianschwarz.net/ibexfiles/PennController/SampleTrials/”);
    PennController.Template( PennController.defaultTable.filter(“Type”,”1″)

    etc etc

    best,

    Matthew

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