URL of experiment: https://run.pavlovia.org/Alipour/selfpacedreadingtask
I have put together a self-paced reading task and finally that everything is working perfectly from the Builder view in PsychoPy, I pushed it to Pavlovia to run it online and you guessed it right, I receive JS errors here. Now I fixed some of it by myself but I’m totally new to this, so any help is much appreciated.
Description of the problem: * TypeError: Cannot read property ‘getKeys’ of undefined
ps: the experiment status is private. I couldn’t change it to public but here are the codes:
myClock=util.Clock() win = psychoJS.window;
words=Sentence.split(' ') nWords=len(words) wordNum=0 oldWordNum=-1 phrase=' ' psychoJS.eventManager.clearEvents() myClock.reset() win.color = "white"
if wordNum>oldWordNum: phrase+=words[wordNum]+' ' text.text=words[wordNum] oldWordNum=wordNum theseKeys = psychoJS.EventManager.getKeys() if 'space' in keys: wordNum+=1 thisExp.addData("Word"+str(wordNum),myClock.getTime()) myClock.reset() if wordNum==nWords: continueRoutine=False