Subject Re: [IBO] blank edit mask for date fields
Author Geoff Worboys (TeamIBO)
OK, I think I need some help/advice on this one.

There are essentially two problems (IMO)...


1. There is no way to tell IBO not to use a mask for date fields.
This applies to dialect 3 DATE and dialect 3 TIME fields, and it also
applies to dialect 1 DATE fields where IB_NOTIME is specified (or
IB_NODATE is specified). This problem exists for both native and
TDataset based implementations.

IMO there should be a way to say that you dont want a mask (perhaps
you want to do your own thing with Get/Set text events etc), without
having to resort to masks like 'ccccccccccc'.

I cant seem to think of a sensible, easy way to implement such a
capability.


2. The DBEdit control does not test for an empty editmask. DBEdit
only tests for blank strings - so when you have an editmask where the
literals are saved (the usual situation for date/time editmasks) then
the value is not blank and so is passed to StrToDate (or whatever) and
an exception results.

This is a peculiarly VCL problem and there are other instances where
this is likely to present problems other than datetime values. In
addition this would be a problem for explicit masks in datetime fields
as well as the default mask.

One possibility is to write and implement an IBO specific variation of
TDateTimeField (and therefore TDateField and TTimeField as well). In
that derivation we can fix the SetAsString problem and so allow masked
strings to be processed as they should.


Thoughts on these issues welcome.

--
Geoff Worboys - TeamIBO
Telesis Computing