Please could you post and image of your code component where you define it?
It is in the first component of the entire experiment. I also tested it in the first component with the textbox input with the same results
Are you definitely running the latest version?
I used to add a visible text message to tell me which version I was running, but no longer bother because Ctrl-Shift-R in Chrome almost always clears the cache and ensures that the latest updates are live.
I updated locally and just double checked that Use Psychopy version is blank (and the output confirms 2020.2.10). I used Ctrl-Shift-R in Chrome as advised, same thing.
Here is the URL to the experiment in case that makes it easier: Pavlovia
@wakecarter - just following up. I’m still having the same original issue with the textbox not functioning on Pavlovia (even though I have updated to 2020.2.10). Any help would be greatly appreciated!
I’d need to get a better idea of your error messages. Please could you set your experiment to running and send me the link?
Thank you.
Please could you show me a screenshot of the contents of textbox_3 ?
I haven’t yet successfully used editable text boxes online.
It might be worth changing your Text and Padding to Constant rather than Set Every Repeat.
However, the error you are getting is similar to a manual translation I have to do when making editable text boxes in code.
Python .upper() translates to JavaScript .toUpperCase()
According to Error with textbox: TypeError: state.toLowerCase is not a function - #8 by kellycotton it should work in 2020.2.10 so perhaps you are still running an earlier version.
I originally had it as Constant and changed it because of the warning “looks like your variable ‘null’ in ‘padding’ should be set to update”. Either way it doesn’t work and same error.
I am running the most updated version (I too was hoping that would fix it).
Should I try adding that manual translation to a Code component in that routine?
I don’t understand why, but the solution for me with this error was to set nReps = 1 (instead of blank) for the loop that had textbox routines, and a loop before it.
Why did you have a loop with blank nReps?
I must have removed the default (I think it is 5?) and left it blank since I only needed 1 repetition, and it worked locally so I didn’t realize that was the problem FOREVER.
So I’m having this problem when trying to run my experiment online after adding a textbox (typeError: state.toLowerCase is not a function). I have version 2020.2.10 and no loops with empty nReps. Any pointers or updates on this?
Do you have any loops with something other than digits in nReps?
Are you using an editable text component?
Do you have Array.prototype.append = [].push; in code_JS?
No loops with something other than digits in nReps (only one loop where nReps = 5)
I have a editable Textbox component (after adding this is when the problem started)
And yes, I do have Array.prototype.append = [].push; in JScode begin experiment.
Try removing Array.prototype.append = [].push;
The issue might be that it is already included in the editable text box.
I tried removing that and got TypeError: dot_dist_list.append is not a function
also tried using + to append my list (after removing the append to push bit), but then got TypeError: arr.reduce is not a function
which I expected something to go wrong since using + to append lists is under the “don’t do” column in the crib list.
(I have sum = (arr) => arr.reduce((a,b)=>a+b) in JScode where Array.prototype.append = [].push; also was)