Hi! In an experiment we have multiple “clickable” numbers (and a plus and minus sign) on screen and the ones having been clicked should appear at the bottom of the screen, visualising the calculation. In PsychoPy it works perfectly fine to use a code snippet (each frame) and to access choose_nrs.clicked_text [where choose_nrs is the mouseclick-variable] joining them via
calculation = " ".join(choose_nrs.clicked_text)
The variable ‘calculation’ is then visualised via a text stimulus, updating each frame. I try to do the js-pendant via
calculation = choose_nrs.clicked_text.join(" ");
inside the code snippet (on the js-side). However, nothing seems to be written into the variable/array choose_nrs.clicked_text so that nothing can be joined and consequently, nothing is displayed.
Do you know why this is?
All the best and stay healthy