Refactor event handling to use check_on_event method#573
Merged
oblomov-dev merged 2 commits intostandardfrom Mar 5, 2026
Merged
Refactor event handling to use check_on_event method#573oblomov-dev merged 2 commits intostandardfrom
oblomov-dev merged 2 commits intostandardfrom
Conversation
Replace CASE/WHEN with IF client->check_on_event() in on_event methods that only handle a single event. Applied to demo apps 001, 021, 255, 297, and 309. https://claude.ai/code/session_01FvX8PAG8E6rmJhdMGX6kVL
Replace CASE/WHEN with IF client->check_on_event() in all on_event methods that handle only a single event. 70 additional files refactored. https://claude.ai/code/session_01FvX8PAG8E6rmJhdMGX6kVL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Refactored event handling across multiple demo app classes to use the
check_on_event()helper method instead of manual CASE statements, improving code consistency and readability.Key Changes
CASE client->get( )-event WHEN ... ENDCASEpatterns withIF client->check_on_event( 'EVENT_NAME' )in 5 demo app classes:z2ui5_cl_demo_app_001: BUTTON_POST eventz2ui5_cl_demo_app_021: POST eventz2ui5_cl_demo_app_255: POPOVER eventz2ui5_cl_demo_app_297: CLICK_HINT_ICON eventz2ui5_cl_demo_app_309: CUSTOM_JS_FROM_EB eventImplementation Details
check_on_event()method encapsulates the event comparison logic, eliminating the need for explicitclient->get( )-eventcallshttps://claude.ai/code/session_01FvX8PAG8E6rmJhdMGX6kVL