OS: Win10
PsychoPy version: 2020
Standard Standalone? (y/n): y
Short version:
I want the accept button of the RatingScale component to show the string “Bestätigen” (german word for confirm) after the rating has been given and not the chosen (numerical) value. I use a code component to do so, I set acceptText='Bestätigen'
, but this does not happen. acceptPreText=''
, on the other hand, does work fine and leaves the accept button text empty before a choice is made.
Detailed description
I have RatingScale components that I use to collect subjective ratings of pleasantness, arousal and valence of stimuli that were shown before. The scale has 9 points, numerical values are not shown, because the ratings should be intuitive and not coupled with any number. So far, so good.
However, I want to give the option to confirm the rating either by pressing enter or by clicking on the accept button. I want the accept button to show the string “Bestätigen” (german word for confirm) and not the chosen (numerical) value.
I display the accept button, I set the acceptPreText and I set the acceptText parameters with a code component (I tried at Begin Experiment, Begin Routine and both):
rating_pleasantness = visual.RatingScale(win=win, name='rating_pleasantness',
marker='circle', size=1, pos=[0.0, -200], low=1, high=9,
labels=['sehr unangenehm', ' sehr angenehm'], scale='',
showAccept=True, stretch=1.3, textSize=0.8, acceptPreText='',
acceptText='Bestätigen')
acceptPreText
does exactly what it should and leaves the accept button empty.
acceptText
, however, does not seem to change anything. The accept button always shows the value from the scale (9-1).
Here the description of these two parameters from the API in case some are not familiar with them:
https://www.psychopy.org/_modules/psychopy/visual/ratingscale.html
-
acceptPreText
: The text to display before any value has been selected. -
acceptText
: The text to display in the ‘accept’ button after a value has been selected.
Can someone please help me with this? I do not see what could possibly be wrong, since acceptPreText
works perfectly fine, but acceptText
does not do anything.
Thank you very much in advance!
Best wishes
Roman
.
.
PS:
I use a code component instead of the customization field of the rating scale itself because when I use the custom option of the rating scale I get this error code:
globalClock = core.Clock() # to track the time since experiment started
^
SyntaxError: invalid syntax
I checked that and this very same syntax is valid when I do not use the custom option of the rating scale, but a code component to do the same.