Subject | Recursive call of TIB_LookupCombo.OnChange |
---|---|
Author | Gabriel Juncu |
Post date | 2002-03-28T12:31:47Z |
Hi List,
I'm using IBO 4.2Fn and Delphi 6 and the following simple app:
Two TIB_Querys: Qry and LookupQry, and a TIB_LookupCombo connected to
LookupQry and updating Qry. Everything works ok until:
In LookupCombo.OnChange event, I put the following statement:
Qry.FieldByName('SOME_FIELD').AsInteger := 1; //example only
Note that SOME_FIELD is DIFFERENT from the field the LookupCombo updates;
From now on, I can't change the value in LookupCombo anymore. With the
debugger I saw that asigning a value to any field of Qry inside OnChange
event produces a recursive call to LookupCombo.OnChange!
Is there any way that I can assign a value to a Qry's field in the OnChange
event of the LookupCombo? (LookupQry contains some default values for some
fields in Qry, so when a user chooses a value in the Lookup , some other Qry fields
must be filled with the default values that the user can change afterwards).
Thank You!
Gabriel
I'm using IBO 4.2Fn and Delphi 6 and the following simple app:
Two TIB_Querys: Qry and LookupQry, and a TIB_LookupCombo connected to
LookupQry and updating Qry. Everything works ok until:
In LookupCombo.OnChange event, I put the following statement:
Qry.FieldByName('SOME_FIELD').AsInteger := 1; //example only
Note that SOME_FIELD is DIFFERENT from the field the LookupCombo updates;
From now on, I can't change the value in LookupCombo anymore. With the
debugger I saw that asigning a value to any field of Qry inside OnChange
event produces a recursive call to LookupCombo.OnChange!
Is there any way that I can assign a value to a Qry's field in the OnChange
event of the LookupCombo? (LookupQry contains some default values for some
fields in Qry, so when a user chooses a value in the Lookup , some other Qry fields
must be filled with the default values that the user can change afterwards).
Thank You!
Gabriel