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 14 MAY 1999 11:12:53AM Brian Wick wrote:

Example only:

1) A function is already running

2) This function then starts a window which only has a Cancel button

 (if Cancel is pressed, then @USER4=EXIT")

3) Same function then continues with its processing loop

 checking if @USER4=EXIT" then it stops

4) After this function is done, the end_dialog/end_window

 closes the 'Cancel' window opened in step #1

Problem is that step#3 causes the 'cancel' window to be inactive

as OI only can do one thing at a time.

Anybody have any ideas on how to accomplish this pseudo code in OI

where the user can click on on cancel button that is always active

to stop a process ? I am hoping I am missing the obvious.

…Brian


At 14 MAY 1999 12:03PM Don Bakke wrote:

Brian,

Within your code that is processing/looping place a Yield() statement. This will simulate multi-tasking in OI and allow you to click on the Cancel button. Everything else in your pseudo logic is good.

[email protected]

SRP Computer Solutions


At 14 MAY 1999 12:54PM Brian Wick wrote:

Don,

Tx. I had answered my own question right after posting it.


At 14 MAY 1999 12:54PM Brian Wick wrote:

Don,

Tx. I had answered my own question right after posting it.


At 14 MAY 1999 04:30PM Richard Hunt wrote:

When i have a program processing large amounts of information, i use a progress meter window (PROGRESS)to show status. This progress meter also has a "CANCEL" button. The cancel button ends the process at a "safe" time.

1) The PROGRESS windows "CANCEL" button causes the PROGRESS window to close. The close event of the PROGRESS window has code to flag a common variable (or in your case could be @USER4) to cancel.

2) The window doing the processing perodically calls the "YIELD()" subroutine so as to allow for the user to click the PROGRESS "CANCEL" button.

3) The window doing the processing, right after the "YIELD()" subroutine checks the common variable (or in your case could be @USER4) to see if it is set to cancel. If it is then at the perfect moment this window will stop its processing.

This is a very good item for my customers when they are posting invoices and they choose to stop posting before all posting is done. the interrupt (cancel or YIELD() subroutine) is put after the end of one invoice post and before it starts the next invoice to post. A perfect and clean interrupt.

View this thread on the forum...

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