logging spreadsheet info

PennController for IBEX Forums Support logging spreadsheet info

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #4170
    snederve
    Participant

    Hi Jeremy,

    Sander again:

    My entire experiment works, loading items from a spreadsheet. I’m running latin-square in groups and that, too, works fine. I have divided up the groups in ABCD, but not all As are manipulated for the same variable. That is to say, the ABCD is used for even distribution, but I use another column “Class” to further specify the variable manipulation for my items.

    I used .log( “Class” , row.Class ) right after the closing parenthesis of PennController – the tutorial said that this command would record the value for the the column ‘Class’ for each row. This doesn’t happen. If I put the command after the closing parenthesis of PennController, I don’t get it recorded in my results, and if I put it in any other place (including right before closing PennC parenthesis) my experiment doesn’t load.

    Here’s my opening code for the PennController:

    PennController.Template( “CSV_ITEMS_Diff.csv”, // No need to setGroup: columns named “Group” are automatically detected as such
    item => PennController(“Class”,
    newText( “sentence” , item.Sentence )
    ,

    –some code in between that make the spreadsheet items appear– end of PennController code —>

    ,
    newButton(“validate”, “Weiter.”)
    .settings.center()
    .print()
    .wait(getScale(“answer”)
    .test.selected()
    .failure(getText(“warning”)
    .settings.visible()
    )
    )
    )
    );

    ———
    So wherever I put my .log( “Class” , row.Class ) command, the results file fails to record it. Am I doing something wrong?

    Thanks.

    Sander

    #4171
    Jeremy
    Keymaster

    Hi Sander,

    It looks like you named your pointer item and not row (expression to the immediate left of =>) so you should use item.Class

    Jeremy

    #4172
    snederve
    Participant

    Hi

    Thanks. It still doesn’t seem to work. My results file will only give a column in which it states “Class”, but not the value of Class for each item.

    Is there any way to log the values within the column, rather than just the column header? Thanks.

    Sander

    #4173
    Jeremy
    Keymaster

    Did you make sure that the colum name in your table’s header row matches the case of row.Class (i.e. are you sure you column’s name is exactly Class)?

    Here is a very short illustration:

    PennController.AddTable( "dummyTable" , `Class,Word,Group
    Upper,Hello,A
    Lower,hello,B
    Lower,world,A
    Upper,World,B`
    );
    
    PennController.Template( 
      "dummyTable"
      ,
      item => PennController( newButton(item.Word).print().wait() ).log( "Class" , item.Class )
    )
    #4174
    snederve
    Participant

    In my CSV file, the headers are as follows:

    Label Class Group Sentence Sagen Claim Question
    Rating VF-1 A bla bla bla bla
    Rating V2-1 B bla bla bla bla
    Rating EVF-1 C bla bla bla bla
    Rating EV2-1 D bla bla bla bla

    So I want the VF-1, V2-1, EVF-1, EV2-1, recorded for each item, but I feel like you already got that…

    Sander

    #4175
    Jeremy
    Keymaster

    Do you have a link to your experiment?

    If I adapt your example table to my example code above, the content of the “Class” cell gets recorded:

    #4176
    snederve
    Participant

    This is the link to my experiment:
    https://expt.pcibex.net/ibexexps/snederve/Speaker_Belief_ListA/experiment.html

    Here’s a link to the zipped folder in which the entire experiment (including CSV) is stored: https://vault.sfu.ca/index.php/s/lRydTawHYdU5oAH

    It’s not with the ABCD groups, but just list A – but I figure that once it is fixed in one list, I can apply that to the others.

    Thanks!

    #4177
    snederve
    Participant

    https://vault.sfu.ca/index.php/s/lRydTawHYdU5oAH

    Another link to the zipped folder. I first accidentally used password protection.

    #4178
    Jeremy
    Keymaster

    Thanks—I’ll give it a closer look later, but just double-checking first: did you try calling .log("Class", item.Class) on the closing parenthesis of PennController() too since you changed to item? Looking at your current script, it is called on the closing parenthesis of PennController.Template(), which it shouldn’t

    #4179
    snederve
    Participant

    It’s always something small I suppose. I didn’t putt the command behind the right parenthesis. Thanks for pointing that out, it now works!

    Thanks a lot!

    -S

    #4182
    Jeremy
    Keymaster

    Glad we got it to work eventually!

    Just a quick question though: do you remember if you had the debugger turned off when you were trying to log with row instead of item? I’m asking because you should get a related error message in the debugger’s Error tab in those cases, and I can’t seem to reproduce an absence-of-error-message bug (which I’d like to fix if it indeed occurs).

    Also, FYI, the next release of PennController will trigger specific error messages when you attempt to use a command on Template() that should be used on PennController().

    #4183
    snederve
    Participant

    Hi,

    Oh yes, I had the debugger turned off — good call: should keep it on while work is in progress.

    Good info to know about the next release, I’ll hopefully keep using PennController for the next few years 🙂

    Sander

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