URL of experiment: https://gitlab.pavlovia.org/jhilgard/maximum_emotion_stroop
Description of the problem:
Keyboard objects practice1_resp and practice2_resp retrieve a column “correctAns” from their respective conditions files. These work just fine in Python, and I am able to use inline code to check the value of practice1_resp.corr and practice2_resp.corr to provide appropriate feedback.
Here’s the code in Python:
msg = "Outcome: " + msg + "\n\nresp.keys: " + practice1_resp.keys + "\n\ncorrectAns: " + correctAns + "\n\nresp.corr" + str(practice1_resp.corr)
Printing $msg with a text component, I can see practice1_resp.keys, correctAns, and practice1_resp.corr:
Here’s the code in JS:
msg = ((((((("Outcome: " + msg) + "\n\nresp.keys: ") + practice1_resp.keys) + "\n\ncorrectAns: ") + correctAns) + "\n\nresp.corr") + practice1_resp.corr.toString());
Printing that same $msg with a text component, I get output indicating that practice1_resp.keys is working, but correctAns is undefined and so practice1_resp.corr is 0:
I’ve tried looking at another Pavlovia study that does have working feedback, and for the life of me I cannot figure out what’s wrong.
Please help me figure out why correctAns is working correctly in PsychoPy but undefined in PsychoJS. I can’t proceed with my experiment until feedback (and logging!) is working correctly.