- Boolean fields are wordbool's now

This commit is contained in:
joost 2005-02-28 16:19:07 +00:00
parent daf59fbd7e
commit bad57b7741
2 changed files with 17 additions and 8 deletions

View File

@ -327,7 +327,7 @@ begin
ftSmallint, ftSmallint,
ftInteger, ftInteger,
ftword : result := sizeof(longint); ftword : result := sizeof(longint);
ftBoolean : result := sizeof(boolean); ftBoolean : result := sizeof(wordbool);
ftBCD : result := sizeof(currency); ftBCD : result := sizeof(currency);
ftFloat : result := sizeof(double); ftFloat : result := sizeof(double);
ftTime, ftTime,

View File

@ -877,7 +877,6 @@ end;
function TLongintField.GetAsVariant: Variant; function TLongintField.GetAsVariant: Variant;
Var L : Longint; Var L : Longint;
v : variant;
begin begin
If GetValue(L) then If GetValue(L) then
@ -1344,14 +1343,18 @@ end;
function TBooleanField.GetAsBoolean: Boolean; function TBooleanField.GetAsBoolean: Boolean;
var b : wordbool;
begin begin
If not GetData(@Result) then If GetData(@b) then
result := b
else
Result:=False; Result:=False;
end; end;
function TBooleanField.GetAsVariant: Variant; function TBooleanField.GetAsVariant: Variant;
Var b : boolean; Var b : wordbool;
begin begin
If GetData(@b) then If GetData(@b) then
@ -1362,7 +1365,7 @@ end;
function TBooleanField.GetAsString: string; function TBooleanField.GetAsString: string;
Var B : boolean; Var B : wordbool;
begin begin
If Getdata(@B) then If Getdata(@B) then
@ -1374,7 +1377,7 @@ end;
function TBooleanField.GetDataSize: Word; function TBooleanField.GetDataSize: Word;
begin begin
Result:=SizeOf(Boolean); Result:=SizeOf(wordBool);
end; end;
function TBooleanField.GetDefaultWidth: Longint; function TBooleanField.GetDefaultWidth: Longint;
@ -1387,8 +1390,11 @@ end;
procedure TBooleanField.SetAsBoolean(AValue: Boolean); procedure TBooleanField.SetAsBoolean(AValue: Boolean);
var b : wordbool;
begin begin
SetData(@AValue); b := AValue;
SetData(@b);
end; end;
procedure TBooleanField.SetAsString(const AValue: string); procedure TBooleanField.SetAsString(const AValue: string);
@ -2192,7 +2198,10 @@ end;
{ {
$Log$ $Log$
Revision 1.24 2005-02-16 09:31:58 michael Revision 1.25 2005-02-28 16:19:07 joost
- Boolean fields are wordbool's now
Revision 1.24 2005/02/16 09:31:58 michael
- Remove TTimeField and TDateField GetDataSize functions since both are exactly - Remove TTimeField and TDateField GetDataSize functions since both are exactly
equal to their ancestor: TDateTimeField.GetDataSize equal to their ancestor: TDateTimeField.GetDataSize
- TAutoInc fields are set to ReadyOnly on create - TAutoInc fields are set to ReadyOnly on create