When running the experiment (with slider) on my desktop it works fine, but when syncing it to Pavlovia I get the following errors.
I tried syncing my experiment without a slider to Pavlovia and that worked fine, so it seems to be the slider that is causing the error. Is there something I can do to prevent this error?
TypeError: this._style.forEach is not a function
core-2021.1.1.js:1924 TypeError: this._style.forEach is not a function
at Slider._sanitizeAttributes (visual-2021.1.1.js:1728)
at new Slider (visual-2021.1.1.js:1546)
at Scheduler.experimentInit [as _currentTask] (ACLTAB.js:168)
at Scheduler._runNextTasks (util-2021.1.1.js:1560)
at Scheduler._runNextTasks (util-2021.1.1.js:1564)
at update (util-2021.1.1.js:1514)
window.onerror @ core-2021.1.1.js:1924
FATAL unknown | {}log4javascript.min.js:1
Might it have something to do with the style options that appear to have changed?
I’ve made a fix and a quick release. Could you try 2021.1.2 and see if that fixes it for you? Sorry but, yes, I think it is to do with the styles changing a little (it wasn’t clear which styles can be used together and which are mutually exclusive)
Thank you, the 2021.1.2 version works! However, the red part in the (radio) slider seems to have completely disappeared. So when (in the running experiment) I am clicking a ‘radio button’ / circle on the slider, I see no red at all. Or am I doing something wrong?
Hi @Anouk, sounds like you have hit a bug with PsychoJS. Would it be possible to give me developer access so I can investigate some more? Here to help, thanks, s.
I went back to an older version (2020.2.10) and for that the sliders do appear (on Pavlovia), but the text position is inconsistent within trials of the experiment, while the settings are the same for all trials.
Hi @Anouk, sorry, the first issue I have no answer for yet, but you should be able to get slider labels to position correctly by creating a custom code component and pasting the following snippet in the Before Experiment tab as in the edited .psyexp below:
experimentInit(); seems to restart the experiment in terms of running Begin Experiment code components, but allows you to continue where you left off. I think that it is only therefore safe to use at the end of an initial routine which has Begin Experiment code but nothing of consequence in Begin Routine / Each Frame / End Routine. I found that when my first routine saved whether the participant was using a touchscreen or not (in Each Frame / End Routine), I lost that setting.