PatrickTingen
New Member
We have an application that is a mix of ADM-1 (yes, ADM one) and non-adm windows on OE11.2. We want to add some functionality that allows the user to jump back to the main menu, regardless of where they are in the application.
We would like to solve this in a generic way. We already experimented a bit; in our main menu program we do a PUBLISH 'goBackToMenu'. We modified the ADM toolbar so that it subscribes to that event. When it is fired, the toolbar checks whether the screen is in update state. If not, it closes it. Control is now back to the main menu program where we start the requested program.
The problem is that windows without a toolbar obviously do not respond to this.
We could modify all non-toolbar windows to add code to respond to the event, but it would be nice if this could be done more generic.
We tried to do something along these lines:
But there is no way to kill all windows that were started from the main man
Any ideas?
We would like to solve this in a generic way. We already experimented a bit; in our main menu program we do a PUBLISH 'goBackToMenu'. We modified the ADM toolbar so that it subscribes to that event. When it is fired, the toolbar checks whether the screen is in update state. If not, it closes it. Control is now back to the main menu program where we start the requested program.
The problem is that windows without a toolbar obviously do not respond to this.
We could modify all non-toolbar windows to add code to respond to the event, but it would be nice if this could be done more generic.
We tried to do something along these lines:
Code:
DEFINE VARIABLE i AS INTEGER NO-UNDO.
REPEAT:
i = i + 1.
IF PROGRAM-NAME(i) = 'main-menu.w' THEN LEAVE.
DELETE OBJECT VALUE( PROGRAM-NAME(i) ).
END.
But there is no way to kill all windows that were started from the main man
Any ideas?