mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 17:21:20 +02:00
+ Commented out Debug-procedure DumpMem
+ implemented TField.Text + fixed TField.CanModify + implemented TDataset.CheckBiDirectional + Fixed TDataset.FilterOptions + implemented TDataset.SetFound git-svn-id: trunk@3215 -
This commit is contained in:
parent
58c01ffd59
commit
56ac885f84
@ -991,10 +991,17 @@ begin
|
||||
//!! To be implemented
|
||||
end;
|
||||
|
||||
Procedure TDataset.CheckBiDirectional;
|
||||
|
||||
begin
|
||||
if FIsUniDirectional then DataBaseError(SUniDirectional);
|
||||
end;
|
||||
|
||||
Procedure TDataset.SetFilterOptions(Value: TFilterOptions);
|
||||
|
||||
begin
|
||||
//!! To be implemented
|
||||
CheckBiDirectional;
|
||||
FFilterOptions := Value;
|
||||
end;
|
||||
|
||||
Procedure TDataset.SetFilterText(const Value: string);
|
||||
@ -1012,7 +1019,7 @@ end;
|
||||
Procedure TDataset.SetFound(const Value: Boolean);
|
||||
|
||||
begin
|
||||
//!! To be implemented
|
||||
FFound := Value;
|
||||
end;
|
||||
|
||||
Procedure TDataset.SetModified(Value: Boolean);
|
||||
@ -1054,7 +1061,8 @@ end;
|
||||
Procedure TDataset.SetOnFilterRecord(const Value: TFilterRecordEvent);
|
||||
|
||||
begin
|
||||
//!! To be implemented
|
||||
CheckBiDirectional;
|
||||
FOnFilterRecord := Value;
|
||||
end;
|
||||
|
||||
Procedure TDataset.SetRecNo(Value: Longint);
|
||||
@ -1637,7 +1645,7 @@ Var
|
||||
Function ScrollBackward : Integer;
|
||||
|
||||
begin
|
||||
if FIsUniDirectional then DatabaseError(SUniDirectional);
|
||||
CheckBiDirectional;
|
||||
Result:=0;
|
||||
{$ifdef dsdebug}
|
||||
Writeln('Scrolling backward:',Abs(Distance));
|
||||
@ -1989,8 +1997,7 @@ end;
|
||||
Function TDataset.Locate(const keyfields: string; const keyvalues: Variant; options: TLocateOptions) : boolean;
|
||||
|
||||
begin
|
||||
if fIsUnidirectional then
|
||||
DataBaseError(SUniDirectional);
|
||||
CheckBiDirectional;
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
|
11
fcl/db/db.pp
11
fcl/db/db.pp
@ -218,7 +218,6 @@ type
|
||||
FAlignMent : TAlignment;
|
||||
FAttributeSet : String;
|
||||
FCalculated : Boolean;
|
||||
FCanModify : Boolean;
|
||||
FConstraintErrorMessage : String;
|
||||
FCustomConstraint : String;
|
||||
FDataSet : TDataSet;
|
||||
@ -227,7 +226,6 @@ type
|
||||
FDefaultExpression : String;
|
||||
FDisplayLabel : String;
|
||||
FDisplayWidth : Longint;
|
||||
FEditText : String;
|
||||
FFieldKind : TFieldKind;
|
||||
FFieldName : String;
|
||||
FFieldNo : Longint;
|
||||
@ -260,6 +258,8 @@ type
|
||||
procedure SetIndex(AValue: Integer);
|
||||
Procedure SetDataset(AValue : TDataset);
|
||||
function GetDisplayText: String;
|
||||
function GetEditText: String;
|
||||
procedure SetEditText(const AValue: string);
|
||||
procedure SetDisplayLabel(const AValue: string);
|
||||
procedure SetDisplayWidth(const AValue: Longint);
|
||||
function GetDisplayWidth: integer;
|
||||
@ -337,7 +337,7 @@ type
|
||||
property AsVariant: variant read GetAsVariant write SetAsVariant;
|
||||
property AttributeSet: string read FAttributeSet write FAttributeSet;
|
||||
property Calculated: Boolean read FCalculated write FCalculated;
|
||||
property CanModify: Boolean read FCanModify;
|
||||
property CanModify: Boolean read GetCanModify;
|
||||
property CurValue: Variant read GetCurValue;
|
||||
property DataSet: TDataSet read FDataSet write SetDataSet;
|
||||
property DataSize: Word read GetDataSize;
|
||||
@ -350,7 +350,7 @@ type
|
||||
property NewValue: Variant read GetNewValue write SetNewValue;
|
||||
property Offset: word read FOffset;
|
||||
property Size: Word read FSize write FSize;
|
||||
property Text: string read FEditText write FEditText;
|
||||
property Text: string read GetEditText write SetEditText;
|
||||
property ValidChars : TFieldChars Read FValidChars;
|
||||
property Value: variant read GetAsVariant write SetAsVariant;
|
||||
property OldValue: variant read GetOldValue;
|
||||
@ -985,6 +985,7 @@ type
|
||||
procedure CalculateFields(Buffer: PChar); virtual;
|
||||
procedure CheckActive; virtual;
|
||||
procedure CheckInactive; virtual;
|
||||
procedure CheckBiDirectional;
|
||||
procedure Loaded; override;
|
||||
procedure ClearBuffers; virtual;
|
||||
procedure ClearCalcFields(Buffer: PChar); virtual;
|
||||
@ -1166,7 +1167,7 @@ type
|
||||
property FieldValues[fieldname : string] : Variant read GetFieldValues write SetFieldValues; default;
|
||||
property Filter: string read FFilterText write SetFilterText;
|
||||
property Filtered: Boolean read FFiltered write SetFiltered default False;
|
||||
property FilterOptions: TFilterOptions read FFilterOptions write FFilterOptions;
|
||||
property FilterOptions: TFilterOptions read FFilterOptions write SetFilterOptions;
|
||||
property Active: Boolean read GetActive write SetActive default False;
|
||||
property AutoCalcFields: Boolean read FAutoCalcFields write FAutoCalcFields;
|
||||
property BeforeOpen: TDataSetNotifyEvent read FBeforeOpen write FBeforeOpen;
|
||||
|
@ -13,7 +13,7 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
Procedure DumpMem (P : Pointer;Size : Longint);
|
||||
{Procedure DumpMem (P : Pointer;Size : Longint);
|
||||
|
||||
Var i : longint;
|
||||
|
||||
@ -22,7 +22,7 @@ begin
|
||||
For I:=0 to Size-1 do
|
||||
Write (Pbyte(P)[i],' ');
|
||||
Writeln;
|
||||
end;
|
||||
end;}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TFieldDef
|
||||
@ -879,6 +879,23 @@ end;
|
||||
|
||||
// TField private methods
|
||||
|
||||
procedure TField.SetEditText(const AValue: string);
|
||||
begin
|
||||
if Assigned(OnSetText) then
|
||||
OnSetText(Self, AValue)
|
||||
else
|
||||
SetText(AValue);
|
||||
end;
|
||||
|
||||
function TField.GetEditText: String;
|
||||
begin
|
||||
SetLength(Result, 0);
|
||||
if Assigned(OnGetText) then
|
||||
OnGetText(Self, Result, False)
|
||||
else
|
||||
GetText(Result, False);
|
||||
end;
|
||||
|
||||
function TField.GetDisplayText: String;
|
||||
begin
|
||||
SetLength(Result, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user