Skip to content

BF: Restore some backwards-compatability to GUI#6792

Merged
TEParsons merged 1 commit into
psychopy:releasefrom
TEParsons:release-bf-gui-bw-compat
Aug 14, 2024
Merged

BF: Restore some backwards-compatability to GUI#6792
TEParsons merged 1 commit into
psychopy:releasefrom
TEParsons:release-bf-gui-bw-compat

Conversation

@TEParsons
Copy link
Copy Markdown
Contributor

When adding "pipe syntax" (the ability to specify a field as fixed, required, etc. by adding |fix, |req, etc.) we switched from using lists to manage the data in GUI to using a dict. Two problems arising from this are:

  1. As fields now need to have a key to index by, I added a required parameter "key" to the beginning of Dlg.addField. This is fine if you're supplying named arguments to this function, but adding an arg to the beginning breaks positional arguments. This PR fixes this by moving the optional param label to the end - essentially shifting everything else forwards.
  2. If label was not supplied, as is the case if previously supplying the labels via the first positional argument (which is now key), the labels were blank. To fix this, I've changed the default for label to None and, if left as None, it will inherit the value of key with any pipe syntax removed.

Addresses (but doesn't fully fix, as the output is still a dict so we still need to document this better) #6790 and #6781

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