Re: Break a loop with a button

From: Jonathan Barton (noone_at_nowhere.com)
Date: 12/08/04


Date: Wed, 8 Dec 2004 23:26:43 +1000


"Richard Hutchinson" <richard.hutchinson@dsl.pipex.com> wrote in message
news:Hu6dnVtt0L6aYyvcRVnygQ@pipex.net...
> Application.MainForm.Close is causing a stack overflow error on the first
> try, but then exits on the second.
>

Application.MainForm.Close would cause a problem if MainForm was showing
other forms, especially modal ones.
You could try application.terminate or halt.
Halt is more aggressive in ending the application than terminate is.
Although good design requires that a global boolean be setup somewhere
"myTerminate" or something, and have all loops that have an
application.processmessages in them to check this variable and break the
loop when it is set.

Jonathan Barton

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.807 / Virus Database: 549 - Release Date: 07/12/04


Relevant Pages

  • Re: Break a loop with a button
    ... > Application.MainForm.Close is causing a stack overflow error on the first ... but then exits on the second. ... Halt is more aggressive in ending the application than terminate is. ... and have all loops that have an ...
    (comp.lang.pascal.delphi.misc)
  • Re: Proof that the diagonal is useless, redundant, noise,
    ... If the machine is failing to halt then you NEVER KNOW ... for which the TM loops on the input, ... >> first parameter on the second. ... >> There is no rightmost digit TO WHICH to add the 1. ...
    (sci.logic)
  • Question on Rosser/Godel Theorems
    ... Godel's theorem to apply to any consistent system) and its reduction ... IF X proves that A Loops THEN Halt ...
    (sci.math)
  • Question on Rosser/Godel Theorems
    ... Godel's theorem to apply to any consistent system) and its reduction ... IF X proves that A Loops THEN Halt ...
    (sci.logic)
  • Re: Do Write Once TMs Halt?
    ... then it will never halt. ... Assume we have a TM that can only read from the tape and move ... No State/Input combination can appear more than once in a Halting Path ... (see loops, below). ...
    (comp.theory)