-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Warn if VARIABLES category without the variable blocks #1098
Comments
I don't like the idea of crashing, but I do think there should be a console error for it. And I think the only error state should be "There are no variable blocks, but there is a variable category." |
I'd vote for console.warn, not an error. |
crash is a weird thing on web. console error and fail gracefully make more sense. To the extent that Android and iOS include their block definitions, I think crashing is fine on those platforms (harder to accidentally forget a file; less likely to be deployed without testing). To that point, those platforms should crash as early as possible, ideally without opening that category. |
Decision: console.warn in this case |
Places to update code:
|
Currently, the default implementation for the Variables flyout checks if get_variable, set_variable, and change_variable blocks exist and populates the flyout for the ones that do. This means that if a developer forgets to include all the variables blocks they will end up with an empty variables category and no explanation why.
Should we crash if they aren't all included? If there isn't at least get & set? If there isn't just one of them?
Note: It looks like Blockly Games Turtle hasn't updated in a while and is only using get/set in the last level (no change).
The text was updated successfully, but these errors were encountered: