Is there any easiest way to do some kind of “restart” standard procedure with a window?
I have a procedure that can be called from the main menu sub-sub-sub… menu item. And I need to run it again after it closed. It is a simple window procedure with a Close button.
I’d either
A) avoid returning from the procedure
or what might be easier to maintain
B) create a “source” procedure which calls your window procedure, and calls it again as desired
Of course you then have your menu pick call the source procedure
2 Likes
For the “calls it again as desired” add an Out Parameter RealProcedure(< *BYTE RunMeAgain >)
. I usually make <Omittable>
so can still be called directly.
In the “Shim Procedure” check for that flag
RealProcedureReRunner PROCEDURE()
RunAgain BYTE
CODE
LOOP
RealProcedure( RunAgain )
IF ~Runagain THEN BREAK.
END
Or my preferred way
RunAgainLabel:
RealProcedure( RunAgain )
IF RunAgain THEN GOTO RunAgainLabel: .
1 Like
Great!!! Thank you, guys! will try it out