Dynamic Menus

Hi all!

I am having a bit of trouble with dynamic menus. I have a routine which works well in VER 8.2 character. This routine builds a menu dynamically using the contents of a table. To get the menu to run procedures in the calling program the triggers in the memory use a :
on choose persistent run .....

This allows menus to be readily deployed with a single line in the main program, then procedures to handle the menu choices. Just what you want.

However in Ver9 gui (in which I have very little experience to date) the same routine gives a '"procedurename" was not found' message.

It doesn't seem to matter if the menu is built in an internal or external routine, the same result occurs. Leaving out the "persistent" modifier stops the message occurring as the trigger goes out of scope when the building procedure terminates, and therefore does nothing when the menu item is selected..

So the problem is, in V9 Gui, why can't the menu find the procedure specified, and what can I do to make it work?

Any good ideas?

David
 
Hi Dave,

This could be something simple, like adding 'IN THIS-PROCEDURE' to the run statement. There may have been a change in behaviour between v8 and v9, but I wasn't aware of it.
 

mra

Junior???? Member
I've tried to build dynamic menus in V9 and it works with
run ..... in this-procedure ...


regards
Mike
 
Thanks for the help people.

It turned out that adding ... in this-procedure didn't work, I had in fact tried that already.

Problem was, it wasn't in "this-procedure" but the main calling procedure, as the menu was not built in the main procedure. However passing a handle to the procedure does work:

run makemenu(this-procedure:handle).
.
.
.

procedure makemenu:
def input parameter h_proc as handle.
.
.
.
on choose persistent run value(proc-name) in h_proc.
.
end.

This works using either an internal or external procedure to build the menu.

Thanks again,
David
 

Kladkul

Member
Can anyone elaborate on how to create dynamic menus? I need to convert a few windows that use the same menus to dynamic so that I only need to modify 1 program instead of multiple window applications.

I'm having trouble finding much information on the web about this in much detail.
 

palthe

Member
Can you be more specific on that question?
Because there is a lot of documentation on how to create dynamic queries.
 

TomBascom

Curmudgeon
Better yet, instead of dragging up an ancient thread about dynamic menus and appending a question about dynamic queries why not open a new thread and ask a new question?
 

Kladkul

Member
Oops, I didn't reread my post after typing it up. I did in fact me dynamic menus and not dynamic queries. I dragged out this ancient thread because I see alot of posters requesting other users to search for answers before turning to the community for help.

Anyway, on the note of being more specific... the company I work for uses an application that has the same menus on several screens this way the user doesn't have to back out of screens to access certain screens else where in the application. Since these menus are all the same, each program has to be individually updated when a new screen is added or updated.

What I've been researching is dynamic menus so that only 1 program will have to be updated. The program would have the menu definitions, triggers and procedures associated with the menu. I've been having trouble finding much documentation on this subject for some reason. Can anyone point me in the right direction?

Thanks.
 

tamhas

ProgressTalk.com Sponsor
It still should be a fresh thread since your problem is your own, not that of the original posters. Commendable to do the research to see if your question has already been answered, but let sleeping threads lie.

Seems to me that you problem isn't so much dynamic menus, but a way to package standard menus for use in many programs.
 
Top