Re: Break a loop with a button
From: Jonathan Barton (noone_at_nowhere.com)
Date: 12/08/04
- Next message: AlanGLLoyd: "Re: TImage initialisation & display"
- Previous message: Richard Hutchinson: "Re: Break a loop with a button"
- In reply to: Richard Hutchinson: "Re: Break a loop with a button"
- Next in thread: Bruce Roberts: "Re: Break a loop with a button"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: AlanGLLoyd: "Re: TImage initialisation & display"
- Previous message: Richard Hutchinson: "Re: Break a loop with a button"
- In reply to: Richard Hutchinson: "Re: Break a loop with a button"
- Next in thread: Bruce Roberts: "Re: Break a loop with a button"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|