Skip to content

Conversation

@lizlooney
Copy link
Collaborator

In blocks that have an mrcOnLoad method, create a method called mrcValidate. Make mrcOnLoad call mrcValidate.

In editor.makeCurrent, call the mrcValidate method on all blocks that implement it.

Fixes #237

…lidate. Make mrcOnLoad call mrcValidate.

In editor.makeCurrent, call the mrcValidate method on all blocks that implement it.
@lizlooney lizlooney requested a review from alan412 September 19, 2025 05:41
Copy link
Collaborator

@alan412 alan412 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that it works on my system. Had one question but it is minor and doesn't stop approval


// Go through all the blocks in the workspace and call their mrcValidate method.
this.blocklyWorkspace.getAllBlocks().forEach(block => {
if ('mrcValidate' in block && typeof block.mrcValidate === "function") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should 'mrcValidate' be a defined constant? Also why is one of these a single quoted string and one a double quoted one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Changed double quotes to single quotes.
@lizlooney lizlooney merged commit 003199a into wpilibsuite:main Sep 19, 2025
1 check passed
@lizlooney lizlooney deleted the pr_issue_237 branch September 19, 2025 16:59
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.

Make necessary changes to blocks when changing tabs

2 participants