Subject Re: [IBO] TIBO StackOverflow Error on TField->OnChange event ()
Author hans@hoogstraat.ca
Ran into something simular couple of days ago.

Solved it with a global variable serving as a OnChangeBusy flag
like:

if not OnChangeBusy and (State in dsWriteModes) then
begin
OnChangeBusy := True;
your stuff
OnChangeBusy := False;
end;

======================

Enrico Raviglione wrote:
>
> Hi,
> i have found a problem on the TField->OnChange event procedure.
> I have a Master TIBOTable (A), and 2 Detail TIBOTable (B) and (C).
>
> In table (B) i have defined an OnChange event-function on a field.
>
> In this event-function i check some fields value in Table (B) and (C) and
> when necessary i must write another field on Master table(A).
>
> If the master table (A) are in Edit mode before the OnChange event are fired
> all work fine.
>
> If the master table (A) are in dsBrowse state, before write my (A)->Field i
> must put the (A)Table in Edit mode but when i do this another
> (B)->Field->OnChange event are fired and a loop start and finish only with a
> StackOverflow error.
>
> Best regards,
> Enrico Raviglione.
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/