Op donderdag 10-01-2008 om 20:28 uur [tijdzone +0100], schreef Bogusław
Brandys:
> Horacio Jamilis wrote:
> > It seems that the Size field shoud be 0 (zero) for numeric fields...
> > The size property of TField have different meanings for the different 
> > field types.
> > 
> > So, you should not set the size property of an Integer field to anything 
> > (the default 0 value is correct).
> > 
> > Hope this helps.
> > 
> > Horacio
> 
> 
> Yes,I found it too.Very bad.I think that it should be processed silently 
> instead of force every package which is working under Delphi to modify.

That this works in Delphi is a Delphi-bug. TField.Size should contain
the amount of decimals, which is really 0 for an integer. But it seems
like that most components-developers don't know this, and the Delphi-bug
is that it is not enforced. It's the DataSize property that has to be 8
(or 4).

FPC has the same bug in all released versions. I changed the behaviour
in fpc 2.3.1 to see what happens. It was merged to fixes too, though.

I'll look how to fix this without removing the call to CheckTypeSize
completely. (Maybe ignore invalid values for those fields where it
doesn't matter, like integer-fields)

Joost

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to