Board index » delphi » Interrupting/cancelling procedures like dialing/printing etc...

Interrupting/cancelling procedures like dialing/printing etc...

How do you go about breaking out of a procedure like dialing up
another machine? I'd like to do this by having a cancel button which
would interrupt the current process, but I don't know how to cancel
something like this without the variables associated with the
interrupted procedure being left in a mess because the procedure
hasn't completed.

Thanks for any help

Finn Austin

 

Re:Interrupting/cancelling procedures like dialing/printing etc...


In article <3499311c.25748...@news.dial.pipex.com>, re...@dial.pipex.com
says...

Quote

>How do you go about breaking out of a procedure like dialing up
>another machine? I'd like to do this by having a cancel button which
>would interrupt the current process, but I don't know how to cancel
>something like this without the variables associated with the
>interrupted procedure being left in a mess because the procedure
>hasn't completed.

   Well, I'm not an expert and will defer to those who know better.  But my
understanding of "modern" programing is that the program, object, etc. should
take care of itself.  Thus if one writes a window to dial, and in the middle
of the process, the window receives a close message, the window should handle
all the cleanup.

  So for dialing to another computer with dialup, you should be able to just
send a close message (equivalent to the users hitting the X on the window
frame)  It is Dialup that is responsible for cleaning up.  Note, this is
different than killing the process.

-John_Mer...@Brown.EDU

Other Threads