Skip to content

Commit

Permalink
Use b% instead of block% in PROCmenu_selection().
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-fryatt committed Dec 25, 2021
1 parent 93e20da commit e73e4cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Chapters/ch01-an-example-application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -483,15 +483,15 @@ ENDCASE</code>

<p>The final thing that we need to do is to handle <name>Menu_Selection</name> events, for which we will use <function>PROCmenu_selection()</function> as seen in <reference id="list-example-app-menu-select" />.</p>

<code id="list-example-app-menu-select" lang="bbcbasic" title="Handling menu selections">DEF PROCmenu_selection(block%)
<code id="list-example-app-menu-select" lang="bbcbasic" title="Handling menu selections">DEF PROCmenu_selection(b%)
LOCAL reopen%

SYS &quot;Wimp_GetPointerInfo&quot;,,q%
reopen% = (q%!8 = 1)

CASE MenuOpen% OF
WHEN IconbarMenu%
CASE !block% OF
CASE !b% OF
WHEN 1 : Quit% = TRUE
ENDCASE
ENDCASE
Expand Down

0 comments on commit e73e4cf

Please sign in to comment.