Subject Problem with Post in TIB_Edit OnEnter, OnExit Event
Author Lukas Zeller
Hello,

After struggling with this for a year (not all the time :-) I need help
from the experts:

I have a form with several TIB_Edits, connected all to one
TIB_DataSource/TIB_Query.

The underlying IB table has Insert and Update triggers which update
some of the fields.

Now, I want the dataset to be posted when I change fields. So I added an
OnExit event to the TIB_Edits which does a PostRetaining to the dataset
when the field exited was modified.
In order to see the results of the trigger, the Dataset has BufferSynchroFlags
set to [bsAfterEdit,bsAfterInsert] (but not bsBeforeInsert).

If the OnExit is fired by focusing another control using the TAB key,
everything
works fine. If OnExit is fired by focusing another control using the mouse,
the target control will have the blinking insertion mark in it, but WONT ACCEPT
ANY KEYSTROKES. I have to click into the control a second time to make it
editable.

I experimented with:
- using Post instead of PostRetaining,
- moving Post(retaining) into the OnEnter event of the target control,
- doing a FocusControl(TargetControl) at the end of the OnEnter event
It makes no difference.

Probably this setup is basically evil, so the question is generally:
How to archieve that changes get posted (and results made visible)
when user focuses another control.

I am using D6 and IBO4 V4.2Eg. The problem however is as old as the
project itself, which started with IBO 3.6 and D5.

Regards, Lukas
--
Lukas Zeller (luz@...)
-
Synthesis AG, Sustainable Software Concepts
info@..., http://www.synthesis.ch