Post Reply 
newRPL - Updated to build 1510 [official build remains at 1487]
08-08-2023, 03:27 AM
Post: #296
RE: newRPL - Updated to build 1510 [official build remains at 1487]
(07-30-2023 07:53 PM)Gilles Wrote:  Hi

I wonders what the sequence :: L2 TMENULST ; means in your exemples in the Wiki for the creation of menus with sub-menus. What is the difference with « L2 TMENULST » ?

L2 is simply the level 2 menu list (the example has menus L1, L2 and L3 here we are assuming you have the list of the L2 example stored in a variable named L2.
TMENULST is the same as TMENU, it displays a temporary menu. The LST suffix stands for "last" meaning it will replace whatever menu the user pressed last. For example if you have your level 1 menu displayed on menu1 (the top one) and you use TMENULST in a menu handler routine, the user obviously activated menu 1 last since your handler is running so TMENULST will open your level 2 menu in the same menu1. You may want to keep your main menu always visible and always open submenus in menu2 for example. In that case you would use TMENUOTHR which does TMENU on the "other" menu meaning the one the user did not interact with.
Remember that the user can always swap menus 1 and 2 at will, so it's not a good idea to hard code your memnus to be in menu1 or menu2. It's recommended that you use TMENULST and TMENUOTHR instead.

The difference between using :: ; versus << >> is that the latter will be pushed to the stack as an object and then you need to do EVAL. The former is executed immediately and in place. When used as menu handlers, there is one additional difference: << >> programs will interrupt the command line editor while :: ; routines run in "transparent" mode, allowing you to remain in the editor.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Navigating through sub-menus - Gilles - 05-13-2023, 11:31 AM
RE: newRPL - Updated to build 1510 [official build remains at 1487] - Claudio L. - 08-08-2023 03:27 AM
It's a mystery to me... - Klaus - 11-27-2023, 12:24 PM



User(s) browsing this thread: 2 Guest(s)