URL of experiment:
https://run.pavlovia.org/hreese/noise_noise_first_then_nl
Description of the problem:
First off, I know that similar problems have been posted before, but I haven’t been able to find the error in the code (I did consult the crib sheet).
I’ve added a dialogue box at the beginning of my experiment to collect participant info. Currently I’m just experimenting with the code that I took from this programming guide.
It works fine in builder but on Pavlovia I’m stuck on initializing experiment, so I assume there is an error in the Python - JS conversion. Here’s the section of the code:
// Start code blocks for 'Before Experiment'
import { gui } from 'psychopy';
var ID, myDialogueBox;
myDialogueBox = new gui.Dlg({"title": "Dialogue Box Exercise"});
myDialogueBox = new gui.Dlg({"title": "My Box", "pos": [400, 350]});
myDialogueBox.addText("Please fill in the following fields:");
myDialogueBox.addField("Participant ID:");
myDialogueBox.addField("Age:");
myDialogueBox.addField("Gender:");
myDialogueBox.addField("Participant ID:", {"color": "blue"});
myDialogueBox.addField("Gender:", {"choices": ["F", "M"]});
myDialogueBox.show();
if (myDialogueBox.OK) {
ID = myDialogueBox.data;
}
The rest of the code can be seen in the GitHub link above. The experiment was running fine before I added the dialogue box.
Could anyone help me get this running?
Thanks in advance.