Board index » delphi » Wierd error in my program -- Compiler bug ?

Wierd error in my program -- Compiler bug ?

In article <01bb57f4.ea2439e0$> "Richard Morey" <> writes:

>        I have a written a dBase program in Delphi 2.0, and here is what happens
>that is wierd.. I have a form (call it FORM1) and it has a bunch of data
>aware controls, including a DBCheckBox. DBCheckBox is associated with the
>field "PROOFED". FORM1, along with the other forms in the appliaction are
>created when the program runs.  In FORM1 I have an OnClick event for the
>DBCHeckBox. Here is where the problem arises.. When I run a different part
>of the program, and I read through my database records, when PROOFED
>changes from FALSE to TRUE, the OnClick event on FORM1 is called.. This
>creates an error message because the end of the OnClick event is a
>SETFOCUS command, which it can not execute because the form is not visible
>when I am running the other part of the program.
>        At the moment, my work around is to check if FORM1 is visible before
>proceeding with the OnClick event.. but I would like this not to happen..
>Does anyone have any idea what it is happening, and/or has anyone else run
>into this kind of problem of their own ?

I have run into phantom onClicks when the value of an underlying field changes
and I can understand why the implementation is that way -- although it's
curious, it was probably judged to be "most appropriate most of the time" or
perhaps "safest."  It had to have been one of those gray-area compromise
things.  Your solution appears to be quite reasonable.

Re:Wierd error in my program -- Compiler bug ?

>> I can understand why the implementation is that way

Hmm.. I can't.. but I'm glad that it is not something in my
program that is causing this error.. Thanks

Other Threads