Re: HP49G+: Nested Menus from CST Message #7 Posted by Vieira, Luiz C. (Brazil) on 1 Dec 2004, 1:28 a.m., in response to message #6 by Eddie Shore
Hi, Eddie;
thanks for your comments. I'm glad for my suggestion being handy. Great!
Now there's another possibility if you don't care using CST menu with actually nested temporary menus. Try this:
TEST
«
{
{ "OPT"
«
{
{ "YES" « "YES IS CHOSEN" 3 DISP 3 FREEZE 1 MENU » }
"" ; blank softkey
"" ; blank softkey
"" ; blank softkey
"" ; blank softkey
{ "NO" « "BAD CHOICE..." 3 DISP 3 FREEZE 1 MENU » }
} TMENU CLLCD " SELECT AN OPTION" 3 DISP 3 FREEZE
»
}
"" ; blank softkey
"" ; blank softkey
{ "PRG1" « "PROGRAM ONE OK" 3 DISP 3 FREEZE » }
"" ; blank softkey
{ "PRG2" "JUST A STRING" }
}'CST' STO 1 MENU
»
The "nested-like" structure is just for clarity (I hope...). All "3 DISP 3 FREEZE" are there as support so the example returns visual results.
In this case, all options are in the same object (in previous example there were three programs). The CST menu accepts temporary menus contained in programs (I guess the TMENU allows this as well, I did not check for ). the actual "trick" (another cheat, perhaps... Shame on me!) is the use of 1 MENU to call CST menu back after running TMENU options. If you load it and runn, you'll see that it produces the submenu effect as well. The biggest enhancement is the use of a single object, as I already mentioned, instead of many.
That's why I like programming RPL: it allows so many options we can't imagine. I'll dare going deep in SYSRPL soon, but I think I did not even touch UserRPL possibilities. I'm still finding UserRPl new possibilities as I'm going further.
Best regards.
Luiz (Brazil)
Edited: 1 Dec 2004, 2:32 a.m.
|