Skip to content

Replace calls to Workspace.variableMethod with calls to Workspace.getVariableMap().variableMethod #2627

@rpbourret

Description

@rpbourret

Check for duplicates

  • I have searched for similar issues before opening a new one.

Component

The following plugins:

  • Shareable procedure blocks
  • Plus-minus mutator blocks
  • Typed variable modal
  • Block test

Description

PR 8415 deprecated a number of methods on Workspace that pass calls to VariableMap. The deprecations recommend replacing calls to Workspace.variableMethod with calls to Workspace.getVariableMap().variableMethod.

The following files have calls that need to be replaced:

Workspace.createVariable

  • plugins/block-shareable-procedures/src/observable_parameter_model.ts (two occurrences)
  • plugins/block-shareable-procedures/test/data_models.mocha.js (two occurrences)
  • plugins/block-shareable-procedures/test/procedure_blocks.mocha.js (two occurrences)
  • plugins/block-plus-minus/src/procedures.js
  • plugins/block-plus-minus/test/procedures.mocha.js (two occurrences)
  • plugins/typed-variable-modal/src/TypedVariableModal.js
  • plugins/block-test/src/fields/validators.js (five occurrences)

Workspace.getVariablesOfType

  • plugins/block-plus-minus/test/procedures.mocha.js
  • plugins/block-shareable-procedures/test/procedure_blocks.mocha.js

Reproduction steps

Stack trace

Screenshots

No response

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions