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 07 AUG 2003 11:22:00AM Gerald Lovel wrote:

In AREV, the following code would look for a user cancel response:

Loop

 Msg( "MSG01", "T10", "", parms )
 If Esc.To.Exit() Then Exit.Flag=True$

Until Exit.Flag

 ... (put your process here)

Repeat

This may not have worked perfectly in AREV, of course, but what is the equivalent in OI? Since there is no Esc.To.Exit, Msg must return the cancellation, maybe through a CANCEL button on the message. However, timed messages do not have buttons and do not return a result. (What does "Asynchronous display" do for timed messages?) Processing messages cannot return a result, and I understand why. The GasGauge type message can return a cancel result, but I do not want the gauge. Is there another option I am missing?


At 07 AUG 2003 05:01PM Steve Smith wrote:

You might be able, instead of using a message box, use a simple form which resembles a message box. Then you have a handle for it and can close it via the windows API using messages, or else put a timer on it and have it close itself using a timer event (and perform whatever post processing is required).

Steve


At 08 AUG 2003 09:27AM Bob Carten wrote:

Emulate the gas gauge.

Make a Window with an Cancel button which simply closes it.

Use Create_Dialog to launch the window , set the mode parameter to true, window will sit there till you end it or the user clicks cancel.

e.g

result='

dialog=Create_Dialog('MYMESSAGE', parent, true$, '')

done=false$

loop

 done=do_your_thing()

while Get_Property(dialog, 'HANDLE')

until done

repeat

End_dialog(dialog, result)


At 08 AUG 2003 02:00PM Gerald Lovel wrote:

Excellent responses, Steve and Bob.

At first it struck me as stupid not to use a message window for what I logically saw as a message function. However, a generic processing window with replaceable text could be reused here, and your example code is a relatively elegant way to catch the form's cancel.

Gerald

View this thread on the forum...

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