| Reference | Downloads | Github

Slider marker does not show online

testSlider.psyexp (7.7 KB)


URL of experiment: testSlider [PsychoPy]

Description of the problem: On Pavlovia, the Slider radio marker doesn’t show up if Force End of Routine is ON. Even then the selected choices do get recorded correctly, which is good.
If I turn Force End of Routine OFF, the marker shows up (in Red, as expected). Since I wish to record the RT associated with the slider choice, I need to keep Force End of Routine ON. I’d prefer not to add a “press space to continue” sort of workaround.
I know that these issues were raised last year, but I couldn’t find a fix to this issue. I’d appreciate some help.

I sometimes add a brief delay after the rating is not undefined. However, you may find my interactive slider demo useful.

Hi! Thanks for the reply. I think the demo is indeed useful but I am not very experienced with the code. Given the version I sent, could you explain how to add a delay if the rating is not undefined? Thanks.

I’m still unable to fix this. The slider is set to “Force end of Routine” as I need to record exact RT of the click and move on to the next trial. How can I record the response, and keep the screen for a few seconds without having Force end of Routine set to ON?
I tried the following - disabled this setting, show a gap screen as soon as the slider option has been selected. And when gap.status == FINISHED, do continueRoutine = False. This works well locally but on Pavlovia, the experiment doesn’t wait for any input. I am not sure what I am doing wrong and how to fix this. Please help.

testSlider.psyexp (12.1 KB)

I’m afraid that I have barely any Internet until Saturday.

It should work if you do something like.

Don’t end the routine automatically

Each Frame

if slider.getRating() > 0 and rated == 0:
    rated = t
elif rated > 0 and t > rated + .25:
    continueRoutine = False

You’ll need to put rated = 0 in Begin Routine

Hey! Thanks a lot for this.
It didn’t work at the beginning probably because slider.getRating() > 0 expected a NoneType instead of an int. So, I changed it to slider.getRating() != None. That worked on the local machine, but not on Pavlovia. There the experiment would end the second it started. I don’t know why.
I messed around on the Console with some debug statements and found out that the if condition slider.getRating ()!=None and rated ==0 was True even before the slider was presented. That didn’t make sense.
Further drilling showed that the the default value of slider.getRating() was undefined whereas the code was checking for None in py or null in js. I then replaced None with undefined and it worked on Pavlovia - but obviously no more on the local machine.
Now that the main issue is sorted (thanks! :), could you tell me how to make this work on both platforms? Here is the code:

if (fSlider.getRating()!= undefined) and (rated == 0):
    rated = t
elif  rated > 0 and t > (rated+0.25) :
    continueRoutine = False

Thanks a lot for your help so far!

Try changing the code component to Both and None / null to undefined on the JS side