Skip to content

Callback parameters can be dropped outside callback (e.g. receivedNumber) #5999

Closed
microsoft/pxt
#10558
@microbit-matt-hillsdon

Description

@microbit-matt-hillsdon

Describe the bug
Callback parameters, e.g. a radio block's receivedNumber parameter, can be dropped outside callback in locations that can't compile.

To Reproduce

See also GIF below.

Steps to reproduce the behavior:

  1. Add a "on radio received (receivedNumber)" block
  2. Add a block to on start that can take a number, e.g. "show number"
  3. Drag the receivedNumber parameter into show number
  4. Unexpectedly the drop is allowed. Shortly after a warning icon shows with the compile error.

The drop isn't allowed in v6. My suspicion is that this isn't an intentional change.

Expected behavior
Behaviour as per v6, can't drop callback parameters in invalid locations.

Screenshots
Image

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: 129.0.6668.101 (Official Build) (arm64)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions