HP49G+: Nested Menus



#2

How can I program nested soft menus?

i.e.

MATH ALG LIST...

Pressing MATH gives a submenu GAMMA BETA DBLFACT...
Pressing ALG gives submenu RISINGFACT SQWAVE SIMULT...
Pressing LIST gives submenu MAKELIST APPLYHP... and so on

I tried nested TMENU commands and had no success. Thanks in advance!


#3

{ { NEST << { MENU1 MENU2 ... } TMENU >> } ... }

That should work. (didn't check though)


#4

I tried

{{ TRIG << {SIN COS TAN} TMENU>> }} TMENU

and when I press TRIG, {SIN COS TAN} comes to the stack.

I'll have to try some way to manipulate this to get nested menus to work (will I have to resort to SysRPL?)


#5

Of course. I wasn't thinking. The menu structure in the 48 series needs a small sysRPL command named TakeOver to run the menu context. If you have emacs/jazz isntalled, this is quite easy to do.

However, you can also use Wolfgang's program Keyman. One of the commands is ->TO or something similar. This appends this sysRPL command to the a program. Then you can build the list on the stack and it will work.

You won't see TakeOver in the program wafter running ->TO, but it is there. So you'll need { { TRIG << *(TakeOver)* { SIN COS TAN } TMENU >> } } and that will work.

#6

Hi, Eddie;

I know the approach I'm showing here looks more like a cheating than a solution (in fact, it IS a cheating) but it works as it is a submenu. If what you want is the functionality instead of an actual submenu structure, this works. I based this sort of construction in the HP42S suggestion for submenu available in the HP42S Owner's Manual, when a program creates submenus for names of the month (or smething like this).I used this approach in some programs with a softmenu that "calls" another menu.

Try this:

MAIN
«
{
{"TXT1"«PROG1»}
{"TXT2"«PROG2»}
{"TXT3"«PROG3»}
""
{"GO 1"«MEN1»}
{"GO 2"«MEN2»}
} TMENU
»

MEN1
«
{
{"TXT4" «PROG4»}
{"TXT5" «PROG5»}
{"TXT6" «PROG6»}
{"TXT7" «PROG7»}
""
{"BACK" «MAIN»}
} TMENU
»

MEN2
«
{
{"TXT8" «PROG8»}
{"TXT9" «PROG9»}
{"TXTA" «PROGA»}
{"TXTB" «PROGB»}
""
{"BACK" «MAIN»}
} TMENU
»

After executing [MAIN] you'l see:
[TXT1] [TXT2] [TXT3] [    ]  [GO 1] [GO 2]
If you press either [GO 1] or [GO 2] you'll see each corresponding "submenu" with a rightmost [BACK] softkey that will bring the MAIN menu back. Either [GO 1] or [GO 2]
surelly accept nesting structures like this one.

Hope this "cheating" gives you a chance of doing something closer to what you want. I'm shure the compiled SysRPL version will do the trick, but I'd like knowing if there is actually some sort of submenu nesting capabilities inside the HP48 O.S.

Cheers.

Luiz (Brazil)

Edited: 30 Nov 2004, 1:16 a.m.


#7

Why did I think of that, Luiz? LOL Your method looks very practical to me, light years away from cheating.

I would like to try Tim's command as well.

Thanks to you both.


#8

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.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Serious discussion regarding soft menus Tim Wessman 24 1,456 10-06-2013, 07:23 PM
Last Post: Helge Gabert
  Hp Prime menus Han 0 179 09-25-2013, 06:18 PM
Last Post: Han
  WP-34S QT emulator bug: real menus for catalogs Marcel Samek 8 756 07-09-2013, 11:25 PM
Last Post: pascal_meheut
  Catalogs as menus in WP34s Qt Emulator pascal_meheut 9 677 05-16-2013, 03:42 AM
Last Post: John Abbott (S. Africa)
  WP34S nested error Alessandro Castellani (Italy) 4 366 02-06-2012, 10:24 AM
Last Post: Marcus von Cube, Germany
  HP 50g - Make menus more like HP48g Brian K 1 252 07-18-2011, 02:43 PM
Last Post: Brian K
  Custom menus Ian Stanley 0 205 02-03-2009, 06:33 PM
Last Post: Ian Stanley
  HP 50g text box menus for functions Stephane 3 366 03-26-2008, 04:44 PM
Last Post: Stephane
  The Menus Of HP35S Walter B 6 474 07-16-2007, 08:02 PM
Last Post: sjthomas
  Custom menus with submenus on HP-49g+? Antonio Maschio (Italy) 5 424 02-13-2007, 01:02 PM
Last Post: Giancarlo (Italy)

Forum Jump: