Subject Re: [IBO] Dataset States and Master Detail
Author Roger Webb
--- In IBObjects@y..., Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
> Hi Roger!
>
> I think I would have attached your code to
BeforeInsert/BeforeUpdate and
> AfterPost of your TIB_Queries rather than the TIB_DataSources, but
I guess
> you may be able to work around your problems by checking the state
of
> ADataset.MasterDataset in addition to ADataset.
>
> HTH,
> Set

Well, I'm not doing anything in the Before Insert or the Before
Update, because thats not the effect I'm going for..

When the state of the Dataset changes... I want to change a label.
Which works in a single dataset environment. It also works in a
Master Detail...when you start editing the detail. It does not work
when you edit the master record... From what I can tell, it is
changing the label , but then the statechecking procedure is run by
the detail (which technically hasnt changed states. This returns it
to looking like it is in dssBrowse. Even though the MASTER is
dssEdit.

So I guess the problem is that when the Master query changes
states... the Detail query is firing off the OnStateChanged procedure
as well, even though it didnt change states itself.

- Roger