Skip to content

Conversation

lizlooney
Copy link
Collaborator

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.

…oadProjectName 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.
@lizlooney lizlooney requested a review from alan412 July 29, 2025 06:06
Copy link
Collaborator

@alan412 alan412 left a comment

Choose a reason for hiding this comment

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

This doesn't seem to keep me from having a duplicate handler.
Screenshot 2025-07-29 at 8 20 12 PM

Copy link
Collaborator

@alan412 alan412 left a comment

Choose a reason for hiding this comment

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

Never mind. I had forgotten to refresh the browser. Sigh.

@alan412 alan412 merged commit ff7c968 into wpilibsuite:main Jul 30, 2025
1 check passed
@lizlooney lizlooney deleted the pr_no_duplicate_event_handlers branch July 30, 2025 00:37
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.

2 participants