blockly-samples
blockly-samples copied to clipboard
Replace calls to `Workspace.variableMethod` with calls to `Workspace.getVariableMap().variableMethod`
Check for duplicates
- [x] 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
@tashee Is this an issue you can work/focus on?