Subject Re: [IBO] TIB_CheckBox delay
Hi Geoff,

--- In IBObjects@y..., "Geoff Worboys" <geoff@t...> wrote:
> > I've noticed that when I examine TIB_CheckBox->Checked in the
> > datasource's OnDataChange event handler, upon changing rows
> > via a TIB_Grid, that the state is still that of the previously
> > selected row of the dataset!
> >
> > Is there a way to ensure that this property is accurate at this
> > time, or do I have to continue using (ClientsQry->FieldByName(
> > "ACCNTHLDR")->AsString == "T"), which does reflect the correct
> > value?
> I would have to go through the code to check the order of all the
> notifications. Is it only the checkbox that is doing this or are
> other controls still waiting to be notified as well?

I've checked the value of one my TIB_Edits on the same form and it
has the correct row's value when this event occurs (I read it via
IB_Edit4->Field->AsString, is this OK?), so I think it's just the
TIB_CheckBox that is a bit slow.

> My preference when in a data component is to use data
> properties/methods.

Can do! (You mean something like (ClientsQry->FieldByName
("ACCNTHLDR")->AsString == "T"), right?)

> If you are worried about the performance of using
> FieldByName, you could setup column references in OnPreparedChanged.

I'm not sure what you're suggesting here. Can you elaborate please?

> Geoff Worboys
> Telesis Computing