Re: Set the CheckBox.Checked without the OnClick being called
- From: Hans-Peter Diettrich <DrDiettrich1@xxxxxxx>
- Date: Fri, 08 Jun 2007 10:20:26 +0200
John Dough wrote:
Oh come on...now you're just being silly.
It makes absolutely no difference whether you compare it to true or
false, or if you simple call it by "if not".
A comparison to True can produce a wrong result, when a semi-boolean type (WordBool...) is compared, or when somebody forced an non-boolean value into a boolean variable. Even if this will never happen in your own code <BG>, other people have other skills or habits, and they may wonder why your pattern doesn't work for them.
Or with even clearer flow of code:
if RunClickEvent then begin
showmessage('This is only shown when needed...');
end;
Why is that any clearer?
Some people ban the use of Exit, with reasonable arguments. I tend to use Exit myself, but in at least one case I wondered why the code, added to the end of a subroutine, was not always executed - due to an Exit hidden somewhere in the preceding code :-(
DoDi
.
- Follow-Ups:
- Re: Set the CheckBox.Checked without the OnClick being called
- From: John Dough
- Re: Set the CheckBox.Checked without the OnClick being called
- From: Rudy Velthuis
- Re: Set the CheckBox.Checked without the OnClick being called
- References:
- Set the CheckBox.Checked without the OnClick being called
- From: Fons
- Re: Set the CheckBox.Checked without the OnClick being called
- From: John Dough
- Re: Set the CheckBox.Checked without the OnClick being called
- From: Rob Kennedy
- Re: Set the CheckBox.Checked without the OnClick being called
- From: Nicholas Sherlock
- Re: Set the CheckBox.Checked without the OnClick being called
- From: John Dough
- Set the CheckBox.Checked without the OnClick being called
- Prev by Date: Runescape Guide: quick tips on makin mone
- Next by Date: Re: Set the CheckBox.Checked without the OnClick being called
- Previous by thread: Re: Set the CheckBox.Checked without the OnClick being called
- Next by thread: Re: Set the CheckBox.Checked without the OnClick being called
- Index(es):
Relevant Pages
|