Hi Jeremy,
I have working on a picture verification task where participants judge whether the text description in the picture matches the content of the picture (e.g., the text box in the picture says “Two dogs are sleeping under the tree” but there is only one dog in the picture, where participants are supposed to press “F” or “J” to make a decision”). The program works but I cannot make the isCorrect function work. Below is the code:
Template("items.csv", row =>
newTrial("experimental-trial",
newTimer("break", 1000)
.start()
.wait()
,
newImage("image", row.Image)
.size(500, 500)
,
newCanvas("myCanvas", 500,500)
.add(0, 0, getImage("image"))
.center()
.print()
.log()
,
newVar("isCorrect")
.global()
,
newKey("keypress", "FJ")
.log()
.wait()
,
newSelector("selection")
.test.selected(row.isCorrect)
.success( getVar("isCorrect").set(true) )
.failure( getVar("isCorrect").set(false) )
)
.log("group", row.Group)
.log("item", row.Item_ID)
.log("condition", row.Condition)
.log("isCorrect", getVar("isCorrect"))
)
The results file show “FALSE” for all my choices. Could you please kindly show me what is wrong with my code?
Best,
Jun