Browse Source

+ Patch from Jesus reyes to notify changes to DisplayFormat

michael 20 years ago
parent
commit
516dfd4c01
2 changed files with 17 additions and 3 deletions
  1. 6 2
      fcl/db/db.pp
  2. 11 1
      fcl/db/fields.inc

+ 6 - 2
fcl/db/db.pp

@@ -521,6 +521,7 @@ type
   TDateTimeField = class(TField)
   private
     FDisplayFormat : String;
+    procedure SetDisplayFormat(const AValue: string);
   protected
     function GetAsDateTime: TDateTime; override;
     function GetAsFloat: Double; override;
@@ -535,7 +536,7 @@ type
     constructor Create(AOwner: TComponent); override;
     property Value: TDateTime read GetAsDateTime write SetAsDateTime;
   published
-    property DisplayFormat: string read FDisplayFormat write FDisplayFormat;
+    property DisplayFormat: string read FDisplayFormat write SetDisplayFormat;
   end;
 
 { TDateField }
@@ -1896,7 +1897,10 @@ end.
 
 {
   $Log$
-  Revision 1.43  2005-03-29 10:07:34  michael
+  Revision 1.44  2005-04-04 07:30:51  michael
+  + Patch from Jesus reyes to notify changes to DisplayFormat
+
+  Revision 1.43  2005/03/29 10:07:34  michael
   + fix for activerecord, bof false after append.
 
   Revision 1.42  2005/03/25 11:38:01  michael

+ 11 - 1
fcl/db/fields.inc

@@ -1441,6 +1441,13 @@ end;
 
 { TDateTimeField }
 
+procedure TDateTimeField.SetDisplayFormat(const AValue: string);
+begin
+  if FDisplayFormat<>AValue then begin
+    FDisplayFormat:=AValue;
+    PropertyChanged(True);
+  end;
+end;
 
 function TDateTimeField.GetAsDateTime: TDateTime;
 
@@ -2185,7 +2192,10 @@ end;
 
 {
   $Log$
-  Revision 1.28  2005-03-23 08:17:51  michael
+  Revision 1.29  2005-04-04 07:30:51  michael
+  + Patch from Jesus reyes to notify changes to DisplayFormat
+
+  Revision 1.28  2005/03/23 08:17:51  michael
   + Several patches from Jose A. Rimon
   # Prevents "field not found" error, when use a query without the primary key
   Set SQLlen of different data types