Don’t allow 2 event handlers for the same event in the same module #185
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In common_storage.ts, added function makeUniqueName. Modified makeUploadProjectName to call makeUniqueName.
In editor.ts, added methods getCurrentModuleType and getEventHandlerNames. Removed fields methodsCategory and eventsCategory, but still create all custom toolbox categories in the constructor.
In mrc_event_handler.ts, renamed function getHasEventHandler to getHasAnyEnabledEventHandlers. Added function getEventHandlerNames.
In mrc_event.ts, modified createCustomEventBlock to take the event name as a parameter.
In hardware_category.ts, renamed functions that return a category to be named get...Category instead of get...Blocks. Make RobotEventsCategory a custom category with a flyout callback.
In event_category, removed field currentModule and method setCurrentModule. Make a unique name for creating a new event.
In methods_category, removed field currentModule and method setCurrentModule. Use editor.getCurrentModuleType() instead.