Skip to content

Comments

BF: Import Clock utils in core for parity with PsychoPy#607

Open
TEParsons wants to merge 1 commit intopsychopy:2024.2.xfrom
TEParsons:bf-util-clock
Open

BF: Import Clock utils in core for parity with PsychoPy#607
TEParsons wants to merge 1 commit intopsychopy:2024.2.xfrom
TEParsons:bf-util-clock

Conversation

@TEParsons
Copy link
Contributor

Currently, if you do the following in a Code Component:

tRemaining = core.CountdownTimer(5)

you'll get an attribute error because PsychoJS.core doesn't have a CountdownTimer - but it does exist, it's just in PsychoJS.util.

We could catch this in the translation in PsychoPy and sub in util, but for something as simple as just importing a class in a second location it seems reasonable to change the JS end to not need this substitution. Plus it means that users manually coding (with a Code Component set to "both") can refer to core.CountdownTimer, which they might if they're used to PsychoPy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant