I've got a problem with a call to Refresh.
In a form I'm showing a Computer -> ComputerPart
master / detail releation in two grids using two
InstantExposers. The ComputerParts
exposer Mastersource points to the Computer
datasource. All works fine,
except if I activate a special editor for the Computer
class.
This editor first calls Refresh() on the Computer instance
to make sure
the user is editing the most recent version of the object.
The call to Refresh generates an exception. It seems
that it has something to do with the ComputerParts,
because the grid showing these instances is totally
mest up.
I've found out it has something to do with the
eoSyncEdit option which is included in the
TInstantExposer.Options.
I've got more synchronisations problems with exposers
using this option:
Exposer shows attributes of object A. This object A
references an object B and the exposer includes the
eoSyncEdit.
Object B is changed in code.
Exposer.ApplyChanges is called.
--> Changes made in code (step 2) are overwritten with
the old values. It seems the Exposer didn't get notified of
the changes and now thinks the attribute has changed,
because the value in the dataset isn't the same as
in the underlying object instance.