Dynamic Parameters: Dynamic trial types? #3075
Unanswered
audrey-hemp
asked this question in
Q&A
Replies: 1 comment 5 replies
-
I think the
@jodeleeuw Would it be an option to make the type parameter dynamic as well? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all! I am converting an existing jsPsych web experiment (with JATOS) into a desktop application with Electron. I want users to be able to select their response type at the top of the experiment (keyboard or buttons) and I am having trouble implementing this.
Currently I have
select_resp_type
as a surveyMultiChoice trial and I know dynamic parameters would allow me to manipulate the prompts and choices of the following trials based on the user input but it won't allow me to change the type of the subsequent trials (jsPsychHtmlButtonResponse
orjsPsychHtmlKeyBoardResponse
for instance).In the web version, JATOS response selection allowed me to execute this with the following code as an example trial:
This was my attempt to convert to dynamic parameters:
It works if I do not try to change the 'type' to a function. If I do, it throws the error:
Uncaught TypeError: Cannot assign to read only property 'Symbol(Symbol.hasInstance)' of function 'class HtmlKeyboardResponsePlugin {
constructor(jsPsych) {
this.jsPsych = jsPsych;
}
trial(display_ele......
}'
at autoBind (index.js:38:1)
at JsPsych.doTrial (JsPsych.ts:568:1)
at JsPsych.nextTrial (JsPsych.ts:551:1)
Please let me know if you have solution for allowing this. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions