| Reference | Downloads | Github

Code working fine on the Builder, can't get it to work on Pavlovia

URL of experiment:
Files · master · Marie Côté / Morphologie · GitLab

Description of the problem: Ok, so I’m only trying to make my experiment work online, and it’s driving me a bit crazy. It works perfectly fine on the Builder and I wrote my code components both in Python and in JS so it should work online. The two major problems I’m experimenting :

  1. I wrote code so what the user types appears on screen. But it first flashes “default text” even if I set my variable inputText to be an empty string at first. I tried setting it at the beginning of the experiment, but I was getting an undefined error, as if online it never went into the routine start if condition (!), so I added a if condition to set inputText as an empty string every frame (!) if undefined, but still, I get the “default text” thingy. I tried adding a Builder inputText variable component as well, doesn’t seem to work (I found almost nothing about that kind of component online, I’m having a hard time figuring out how it works since I thought it sets a variable globally, but we have to put it in a routine…).

  2. I wrote code so feedback would be given in the practice part of my experiment. The user types his answer, presses “Enter” and gets the exact same things that were already there (some word(s) + what the participant typed), but with some feedback, this time. On the Builder, everything works fine. Online, the word(s) part stays, but what the participant typed disappears, then if you press a key again it reapppears but only in a flash and the experiment skips to the next screen. And the feedback part never shows up. It’s a mess, really.

Here’s my experiment so you can see what’s supposed to happen via the Builder…
Epreuves_morpho.psyexp (244.5 KB)

Please help :(.

If you come across these problems, this might help: Unwanted subliminal prime