Subject | Re: [IBO] Possible Incorrect Logic in TIB_LookupCombo |
---|---|
Author | Eric Handbury |
Post date | 2002-10-09T00:14:49Z |
--- In IBObjects@y..., Helen Borrie <helebor@t...> wrote:
the value specified in the DefaultValues. Why would IBO set the field
to NULL when I have explicitly told IBO (via the DefaultValues entry)
that I want this field to be 0 as the default?
This characteristic means that if the user inserts and doesn't
select a lookup-entry the field will be stored as a 0 no problems,
but if the user inserts, then selects a lookup-entry, then hits DEL,
a Access Violation is generated. This doesn't make sense and is
inconsistent.
> At 02:42 AM 04-10-02 +0000, you wrote:entry in
> >Hello,
> >
> > (BCB6-SP2, IBO-4.2Hf, FB-1.0, Enh2.1.2)
> >
> > I have a LookupCombo, which when I hit 'DEL' to delete the
> >the control, it sets the underlying field to NULL. I don't thinkthis
> >is correct... I feel it should set the field to the value stored inif you
> >the DefaultValues.
>
> Defaults are applied to inserted rows only, so they won't kick in
> clear a value in an existing row.can
>
> If you don't want Field.Clear behaviour from the DEL key then you
> intercept the keystroke and replace it with whatever you want, e.g.restore
> its original value by referring to the OldValues object (aTIB_Row); or
> explicitly read the DefaultValues array if you want to access it inedit
> mode...But it is logical for IBO to revert the value of the field back to
the value specified in the DefaultValues. Why would IBO set the field
to NULL when I have explicitly told IBO (via the DefaultValues entry)
that I want this field to be 0 as the default?
This characteristic means that if the user inserts and doesn't
select a lookup-entry the field will be stored as a 0 no problems,
but if the user inserts, then selects a lookup-entry, then hits DEL,
a Access Violation is generated. This doesn't make sense and is
inconsistent.