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.
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.
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.
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.
Closes #3