Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 05 NOV 1999 03:06:26PM Don Miller - C3 Inc. wrote:

I have a problem:

In a form, I have a menu option which calls a subroutine which will do the following:

Compile a report showing specific information
Call a Report to Display / Print this information
Prompt the user to take some action

If I call OR_VIEW to do the report, it never comes back to the subroutine on the Close Event. Any suggestions?

Don Miller


At 08 NOV 1999 11:15AM Stephen S. Revelation wrote:

Don,

Perhaps a RETURN 1 statement needs to be inserted somewhere in the process?

-Stephen


At 09 NOV 1999 09:34AM Don Miller - C3 Inc. wrote:

Stephen..

Here's a skeleton of the program:

SUBROUTINE DO_SOMETHING(VOID)

DECLARE FUNCTION MSG

DECLARE SUBROUTINE OR_VIEW

* build an R/LIST SENTENCE INTO VARIABLE CMD

CALL OR_VIEW with command buffer set

* the OR_VIEW report works just fine * when the user closes the report, perhaps * after printing, it should exit and come * back to this subroutine…

MSG.TXT=Do you want to do something?'

MSG.TXT=BNY'

* I never get here …..

Opt=MSG(@WINDOW,MSG.TXT)

… if yes button clicked then do whatever

RETURN

..

This code is hooked to a menu choice with a quick-event

to execute a stored procedure.

Don Miller

C3 Inc.


At 09 NOV 1999 04:37PM Stephen S. Revelation wrote:

Don,

I was just looking at the source for OR_VIEW and it ends with a RETURN ''. Perhaps if we changed it to 1 here? Let me know.

-Stephen


At 10 NOV 1999 09:32AM Don Miller - C3 Inc. wrote:

Stephen..

Carl Pates of Sprezz. found the problem. OR_VIEW is not executed modally (via a DIALOG_BOX call). Rather it just does a call to START_WINDOW. If it is executed in event context from a user window with a process following it's call, it does an immediate return. One way around it is (from Carl Pates) - Assuming the actual name is ORMAIN:

CALL OR_VIEW(blargh…)

Loop

While Get_Property("ORMAIN","HANDLE") ;* see if it's still alive

Call Yield() ;* let other processes continue

Repeat

Do the rest of your stuff

Don Miller

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/410a08a276bf572f852568200068f5e7.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1