-
Notifications
You must be signed in to change notification settings - Fork 18
Disable getters and setters with invalid value #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable getters and setters with invalid value #71
Conversation
|
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. |
…isable-dropdown-on-incorrect-value
mark-friedman
left a comment
There was a problem hiding this 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.
block-lexical-variables/README.md
Outdated
| ### 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: | ||
|
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
mark-friedman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #3