OS (e.g. Win10): MacOS
PsychoPy version (e.g. 1.84.x): 1.85.4
Standard Standalone? (y/n) Yes
What are you trying to achieve?: Update and display keyboard input in textBox
What did you try to make it work?:
I was having the same problem occurring in the link below (psychopy crashing with keyboard input):
The comments on the thread above wrote that textBox is more stable than textStim, so I was trying to
use textBox in the code component within the builder.
However, I couldn’t find a way how to update keyboard input using textBox.
I did create a textbox using the code below in the begin experiment section:
text = ‘default text’,
I also created the objects below in the begin experiment section:
word = “Type what you heard”
inputText = “” -> this is the object that changes with every keyboard input
However, when I added the line below in the each frame section
textbox.setText(word + ‘\n’ + inputText)
I got an error message.
What specifically went wrong when you tried that?:
Below is the error message:
textbox.setText((word + ‘\n’ + inputText))
TypeError: ‘str’ object is not callable
Exception RuntimeError: RuntimeError(‘sys.meta_path must be a list of import hooks’,) in <bound method ExperimentHandler.del of <psychopy.data.experiment.ExperimentHandler object at 0x1107eaed0>> ignored
Has anyone succeeded in updating keyboard input and showing that in the textBox?