[Lazarus] To TDBEdit users: EditMask property about to being ignored
Luiz Americo Pereira Camara
luizmed at oi.com.br
Tue Mar 6 16:57:45 CET 2012
On 6/3/2012 09:39, José Mejuto wrote:
> Hello Lazarus-List,
> Tuesday, March 6, 2012, 1:26:18 PM, you wrote:
>>> TDBEdit.EditMask should be ignored only if it has default value
>>> (nothing), if it has a value it should override field mask IMHO.
> JM> Why should there be 2 EditMasks? To confuse people maybe?
> JM> Just remove TDBEdit.EditMask if it is not used.
> There are 2 possibilities. Same field could be editted in two
> different controls at the same time, like a TDBGrid and a TDBEdit, but
> in TDBGrid you can use a more compact mask for editing a date (in
> example) but a more verbose in a TDBEdit.
> The second one is that if the user does not define a edit mask he/she
> can not use a TDBMaskEdit (it does not exists). The presence of a
> TDBMaskEdit in the component palette will invalidate this of course.
> Anyway if TDBEditMask is removed I will not complaint
Initially i think of not using TDBEdit.EditMask property at all since
could lead to the confusion cited by Juha and to be Delphi compatible.
But given the below reasons:
- Keep compatibility with existing LCL code
- Provide a simpler way to define a Mask to datasets with fields created
dynamically (not at design time)
I have the idea of adding a property OwnsMask that defaults to false.
Seems a good compromise between Delphi compatibility (by default) and
compatibility (just change a property)
More information about the Lazarus