Skip to content

Dynamically generated blocks output is being lost after last lib update #4757

@joseluiz98

Description

@joseluiz98

Describe the bug

After last blockly update (version 5.20210325.0) a dynamically set output on a block of mine is losing info on getCheck() function. The scenario consists in:

  • I have a setOutput(true, value) inside a block validator.
  • I have a getCheck() inside a block setOnChange function

Previously on version 4.20201217.0) and even before it, the setOnChange() function calling the getCheck() on the outputConnection of this block, attached to the source block listened on the setOnChange function returns the output dynamically set correctly, but now, it always returns undefined, breaking all the logic

To Reproduce

Steps to reproduce the behavior:

  • Add a setOutput(true, value) inside a block validator.
  • Add a getCheck() inside a block setOnChange function

Expected behavior

The getCheck() function must return the arrays of types defined previously by calling the setOutput() function, as documented.

Desktop (please complete the following information):

  • OS: [e.g. iOS] - Ubuntu 20.04.1 LTS
  • Browser [e.g. chrome, safari] - Chrome
  • Version [e.g. 22] 88.0.4324.182 64 bits

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions