Skip to content

Conversation

@TannerGabriel
Copy link
Contributor

Closes #3

@TannerGabriel TannerGabriel marked this pull request as draft August 8, 2025 15:49
@TannerGabriel TannerGabriel marked this pull request as ready for review August 8, 2025 15:54
@mark-friedman
Copy link
Collaborator

Currently, the plugin doesn't disable invalid blocks in order to be consistent with App Inventor. I suggest that this PR be modified to add an option that's passed to the plugin's init function to control the disabling behavior.

Copy link
Collaborator

@mark-friedman mark-friedman left a comment

Choose a reason for hiding this comment

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

Just one documentation nit.

### Disabling invalid getter/setter blocks

By default, getter and setter blocks remain enabled even if their selected variable is out of scope or doesn’t exist. You can change this behavior so that invalid blocks are automatically disabled by passing the `disableInvalidBlocks` option when initializing the plugin:

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that the options argument to the init method should be documented in the Usage section later in the README. That then, can be referenced here, in the getter/setter block documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds reasonable. I also added an Available options list in case we add more options in the future. Let me know if this works for you, or if you would like to change the text or formatting.

Copy link
Collaborator

@mark-friedman mark-friedman left a comment

Choose a reason for hiding this comment

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

LGTM

@mark-friedman mark-friedman merged commit 1e50351 into mit-cml:main Sep 12, 2025
1 check passed
@TannerGabriel TannerGabriel deleted the feat/disable-dropdown-on-incorrect-value branch September 13, 2025 06:34
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.

Should we disable invalid variable setters and getters?

2 participants