Skip to content

Commit 996c247

Browse files
committed
Fix 8 code snippet bugs across documentation
- logging.md: fix variable name factory(log) → factory(lo_log) (won't compile) - popups.md: fix popover by_id='my_id' → by_id='TEST' (wrong anchor element) - navigation.md: wrap _event_client() in follow_up_action() (result was unused) - trouble.md: add missing DATA declaration for variable 'input' - trouble.md: remove debugger; statement from JS snippet - general.md: fix client->get( )->event → client->get( )-event (structure access) - srtti.md: remove unused variable o_table - dx.md: rename duplicate report zre_app_alv → zre_app_popup https://claude.ai/code/session_01AaA4EMw83KMzGP6kaDZPJU
1 parent 8bdcad3 commit 996c247

7 files changed

Lines changed: 12 additions & 12 deletions

File tree

docs/development/general.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ CLASS z2ui5_cl_demo_app_001 IMPLEMENTATION.
6262
6363
DATA(lt_arg) = client->get_event_arg( ).
6464
65-
CASE client->get( )->event.
65+
CASE client->get( )-event.
6666
WHEN `BUTTON_POST`.
6767
client->message_toast_display( |{ mv_value } - send to the server| ).
6868
ENDCASE.

docs/development/navigation/navigation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ Sound familiar? The abap2UI5 framework emulates the classic `call screen` and `l
5252
#### Launchpad
5353
We recommend using backend communication exclusively for view changes or popup calls. If you're using a launchpad, consider navigating through the launchpad to utilize browser navigation and history. Here's an example:
5454
```abap
55-
client->_event_client(
56-
val = client->cs_event-cross_app_nav_to_ext
57-
t_arg = VALUE #( (
58-
`{ semanticObject: "Z2UI5_CL_LP_SAMPLE_04", action: "display" }`
59-
) ) ).
55+
client->follow_up_action( client->_event_client(
56+
val = client->cs_event-cross_app_nav_to_ext
57+
t_arg = VALUE #( (
58+
`{ semanticObject: "Z2UI5_CL_LP_SAMPLE_04", action: "display" }`
59+
) ) ) ).
6060
```
6161
To learn more about launchpads and routing, refer to the documentation [here.](/configuration/launchpad)
6262

docs/development/popups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ To display a popover, use the method `client->popover_display` and specify the I
113113
press = client->_event( `POPOVER_CLOSE` ) ).
114114
client->popover_display(
115115
xml = popover->stringify( )
116-
by_id = `my_id` ).
116+
by_id = `TEST` ).
117117
118118
WHEN `POPOVER_CLOSE`.
119119
client->popover_destroy( ).

docs/development/specific/logging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ METHOD z2ui5_if_app~main.
5454
lo_log->e( `This is an error...` ).
5555
lo_log->s( `This is a success message...` ).
5656
57-
client->nav_app_call( z2ui5_cl_pop_messages=>factory( log ) ).
57+
client->nav_app_call( z2ui5_cl_pop_messages=>factory( lo_log ) ).
5858
5959
ENDMETHOD.
6060
```

docs/development/trouble.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ For UI5 input fields, the soft keyboard is automatically shown when focusing an
88
99
METHOD z2ui5_if_app~main.
1010
11+
DATA input TYPE string.
12+
1113
IF client->check_on_init( ).
12-
14+
1315
DATA(view) = z2ui5_cl_xml_view=>factory( ).
1416
view->_generic( name = `script`
1517
ns = `html` )->_cc_plain_xml( `z2ui5.afterBE = (id , mode) => { ` &&
16-
`debugger;` &&
1718
`var input = z2ui5.oView.byId(id).getDomRef();` &&
1819
`input = input.childNodes[0].childNodes[0];` &&
1920
`input.setAttribute("inputmode" , mode);` &&

docs/technical/dx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ From here, it's just a small step to generate everything dynamically with RTTI
150150
Anyone who has browsed SE37 for POPUP_TO_* knows the charm of classic ABAP popups. Function modules like `POPUP_TO_CONFIRM` are simple yet powerful:
151151

152152
```abap
153-
REPORT zre_app_alv.
153+
REPORT zre_app_popup.
154154
155155
DATA event TYPE string.
156156
CALL FUNCTION `POPUP_TO_CONFIRM`

docs/technical/tools/srtti.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ CLASS z2ui5_cl_app IMPLEMENTATION.
6969
p_table_kind = cl_abap_tabledescr=>tablekind_std
7070
p_unique = abap_false ).
7171
72-
DATA: o_table TYPE REF TO data.
7372
CREATE DATA mr_tab TYPE HANDLE o_table_desc.
7473
7574
client->message_box_display( `this works only with S-RTTI` ).

0 commit comments

Comments
 (0)