no procedure editor

Hi all,
I thought I had cracked the problem with my APPS. When I run my APPS from my shortcuts, '...PROWIN 32, -p app.w -db c:c\app\db.db ' I get a blank proceure editor window displayed. I want to stop this. On investigation I thought I had cracked it! use -param though I do not know how to use the syntax correctly I initially thought just having -p ...(my proc_ + tag on the end -param. Though this did not work. Any ideas?
Cheers. Regards
 
When is the procedure editor displayed? When your application ends? If so, then you will need to specify the QUIT statement in your application.

Note that when the startup procedure ends, the procedure editor is displayed only if you have a version of Progress in which the procedure editor can be used. For example, if you have ProVision, the procedure editor will be displayed. But if you have just client networking installed (e.g. run-time only) then the procedure editor will not be displayed.
 
Provision

I have a FULL Provision license for Version 9. I also have a shortcut to prowin 32 on my desktop, this shortcut supplies my parameters. -p , -db, -1 ...
I have 1 shortcut for development with my -p set to the appbuilder, -db specified and then -1. However when I change the -p to my app file when the app closes a blank Procedure edotor is displayed.
 

Dirky

New Member
mpowell_esq said:
I have a FULL Provision license for Version 9. I also have a shortcut to prowin 32 on my desktop, this shortcut supplies my parameters. -p , -db, -1 ...
I have 1 shortcut for development with my -p set to the appbuilder, -db specified and then -1. However when I change the -p to my app file when the app closes a blank Procedure edotor is displayed.
So what statement do you use to close the app? do you use...

a) nothing at all, just end the program?
b) 'return'
c) 'quit'

as far as I know, only quit will really get you back to the command prompt in Unix, but it could of course be completely different under Windows, though I doubt it.
 
It's the same for UNIX and Windows.

If your startup procedure just ends or uses RETURN, then you will get the procedure editor if you are using a development version of Progress. You will not get the procedure editor if you are using a run-time version of Progress.
 
Environment:
Windows 9x
Progress V9.1
I use this to quit/close my app that ALWAYS closes with a blank procedure window displayed. - the termination code 'APPLY "CLOSE":U TO THIS-PROCEDURE.'
Cheers,
Regards
 
The CLOSE event does NOT close the procedure. It simply fires a CLOSE event on the procedure widget. If you are NOT using a SmartWindow, then the MAIN-BLOCK in your window should contain this code:

ON CLOSE OF THIS-PROCEDURE
RUN disable_UI.

/* Best default for GUI applications is... */
PAUSE 0 BEFORE-HIDE.

/* Now enable the interface and wait for the exit condition. */
/* (NOTE: handle ERROR and END-KEY so cleanup code will always fire. */
MAIN-BLOCK:
DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK
ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK:
RUN enable_UI.
IF NOT THIS-PROCEDURE:pERSISTENT THEN
WAIT-FOR CLOSE OF THIS-PROCEDURE.
END.


When you issue the CLOSE event, the ON CLOSE event fires to disable the UI. And then the WAIT-FOR terminates. If this is your startup procedure, it will not be persistent so the WAIT-FOR will be active.

When the WAIT-FOR ends, execution leaves the DO block and as there are no more 4GL statements after the DO block, the procedure ends. But it ends with a RETURN statement which is implied if you haven't actually written one.
For example, the following code has exactly the same effect as the above code.

MAIN-BLOCK:
DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK
ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK:
RUN enable_UI.
IF NOT THIS-PROCEDURE:pERSISTENT THEN
WAIT-FOR CLOSE OF THIS-PROCEDURE.
END.

RETURN.

To get your session to end when the procedure ends, all you need to do is use the QUIT statement after the DO block instead of a RETURN (or an implied RETURN).

MAIN-BLOCK:
DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK
ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK:
RUN enable_UI.
IF NOT THIS-PROCEDURE:pERSISTENT THEN
WAIT-FOR CLOSE OF THIS-PROCEDURE.
END.

QUIT.
 
Top