Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussions post on build_Trial functions vs _Trial objects #119

Open
RobertGemmaJr opened this issue Mar 12, 2024 · 0 comments · May be fixed by #138
Open

Discussions post on build_Trial functions vs _Trial objects #119

RobertGemmaJr opened this issue Mar 12, 2024 · 0 comments · May be fixed by #138
Assignees
Labels
discussions Issue is for a discussions post

Comments

@RobertGemmaJr
Copy link
Member

RobertGemmaJr commented Mar 12, 2024

Currently we use functions to pass around the jsPsych object as it is not global to the window. A little bit of explanation as to why that's necessary would probably be a good thing!

  • The jsPsych object must be called from inside the trial object itself in order to have access to the data.
    • This is an anomaly because jsPsych is a class
    • It's fine to pass around the class it's just a matter of when the object is actually used
  • The build_Trial function is called when the timeline is built not run. Only the callbacks inside a trial are executed when a trial is run
    • Almost any key in the trial object can be a callback function!
@RobertGemmaJr RobertGemmaJr added the discussions Issue is for a discussions post label Mar 12, 2024
@fordmcdonald fordmcdonald self-assigned this May 2, 2024
@fordmcdonald fordmcdonald linked a pull request May 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussions Issue is for a discussions post
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants