Softmenu - DrawMenu wrapper
|
12-05-2014, 10:47 AM
(This post was last modified: 12-05-2014 01:04 PM by Angus.)
Post: #1
|
|||
|
|||
Softmenu - DrawMenu wrapper
For convenience with my user keyboard I ended up with the Softmenu function. Many might use something similar, but somebody might find the following helpful.
In the example I use the different assignments CR Haeger suggested in the plotting from cas thread to SHIFT+D. Code: [/quote] Quick and dirty, I know. but I do use this kind a lot. Personally I am happy with the results - if we got some kind of autoexecute for the returned Strings (think about rpn) I would be pleased. In an other thread I asked if it is possible to distinguish between cas and home: I still could not figure out how that is done. |
|||
12-08-2014, 09:11 AM
Post: #2
|
|||
|
|||
RE: Softmenu - DrawMenu wrapper
Hello Angus,
i use pretty much the same code to display a menu. I only added a STARTVIEW(-1); before the DRAWMENU command. i like to see the home screen when displaying the menus and not see the list of programs. My 2 cents, Giancarlo |
|||
12-08-2014, 11:50 AM
Post: #3
|
|||
|
|||
RE: Softmenu - DrawMenu wrapper
The way I use the DRAWMENU command is with the user keyboard. The View Button is abused to display the Softmenu for a specific key. So I had no need to switch to home view.
As stated before I would love to be able to 'autoexecute' anything on the entry line. That would solve many aspects and, correct me if I am wrong, it sounds realizable. |
|||
12-08-2014, 01:15 PM
Post: #4
|
|||
|
|||
RE: Softmenu - DrawMenu wrapper
Hello,
Unfortunately i don't remember the name of each program i write hence i always go to the program list and then click on the run soft button. This doesn't means that i like the way the programs are listed. If the menu directories like the hp48 won't be available, i'd like to have them anyway separated by subject or domain. At the moment i write one program, test it and once completed i paste it in another program which contains all the procedures written for the same argument. This is not very efficent but it prevent me from having dozens of programs mixed up... Thanks Giancarlo |
|||
12-08-2014, 02:22 PM
Post: #5
|
|||
|
|||
RE: Softmenu - DrawMenu wrapper
Hello Giancarlo,
just a suggestion: put special (to You) comments on top of each program and also above some EXPORTed functions/variables defining a menu location (e.g. //!menu: category subcategory ...) and/or some descriptive help text (e.g. //!purpose: hello world prog). Then write a starter program which uses these lines by utilizing the Programs() variable: 1. get all program names, 2. read each program's source and search for your special comments, 3. build an appropriate menu structure (with menus, submenus, ..., help texts), 4. let the user select an item and return the program.function name (with additional "()" if in non-rpn mode) Let a user key execute your starter. If the parsing takes too long, save the once built structure in a program-local variable and rebuild only if manually requested. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)