OSweb touch_screen not logging correct_response
Hi,
my experiment, which uses the touch_response item, does not seem to log basic variables such as 'correct_response'. It runs fine offline, and all the modules seem to be compatible.
here is the experiment: https://www.dropbox.com/s/ibnr92qruvwf21b/Exp1.osexp?dl=1
Am I doing anything wrong here?
Best,
Thomas
Comments
I have the same question. It looks like that in the online version we can only retrieve data in terms of "mouse" cursor position. :(
Hi you two,
I have no clue why it did not work (Please file a github issue!), but a work around is it to manually compute the correct variable. I did that in the attached example (only for the red dot part) and it works. For the rest of the sequence, you can use the same approach and adapt it (the action happens in the javascript_inlinescript).
Good luck,
Eduard
Hi,
thx so much @eduard . It is working indeed.
A Github issue has already been filed here.
However, I think I'm running into another issue here, still regarding how JS is handling the variables I guess: impossible to match the multiple correct_response specified in the loop with the output of vars.response. In other words, it seems to only work when there is a single correct response (number) specified as a correct response.
If you try to implement your solution to the next response in the sequence you'll see what I mean.
Thx again!
Tom
Hi Tom. Can you use the
includemethod? See the attached script. I checked whether the variable response is present in the variable correct responses. If it is in there, the output is correct, if not the output is false. Those 2 variables can then be used to define what you want to show when.Does that make sense?
Eduard
Hi Eduard,
thx again for that. Unfortunately, while I totally get what you are after with
includeyour script doesn't work on my computer for some reason and crashes while showing the following error:TypeError: 'undefined' is not a function (tried calling property 'includes' of 'String').
I tried getting close to there by using
typeofand saw that indeed vars.response = 'number' while correct_rectangle = 'string'. However, forcing vars.response into a string doesn't make it work either: it somehow still doesn't want to match the actual response with a list of correct response. As a temporary workaround I'm creating one column per correct response, but then the run if arguments are becoming a nightmare.Thomas
Hi Thomas,
Just to be sure that this isn't the issue, when I run the experiment in Opensesame, I get the same issue, but running in the browser seems to work. I have to admit that I haven't checked whether all the variables make sense, and the behaviour is exactly what you had in mind. But the procedure didn't spit out any errors at least.
Could you verify that the solution wouldn't be as easy as that?
Eduard