Ignore:
Timestamp:
Mar 29, 2018, 10:59:19 AM (6 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ProjectTemplates/FileMenuProject/UDataFile.pas

    r507 r508  
    1515    FFileName: string;
    1616    FModified: Boolean;
     17    FOnDestroy: TNotifyEvent;
    1718    FOnModify: TNotifyEvent;
    1819    procedure SetFileName(AValue: string);
     
    2425    procedure SaveToFile(FileName: string); virtual;
    2526    constructor Create; virtual;
     27    destructor Destroy; override;
    2628    property FileName: string read FFileName write SetFileName;
    2729    property Modified: Boolean read FModified write SetModified;
    2830    property OnModify: TNotifyEvent read FOnModify write FOnModify;
     31    property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
    2932  end;
    3033
     
    8184end;
    8285
     86destructor TDataFile.Destroy;
     87begin
     88  if Assigned(FOnDestroy) then FOnDestroy(Self);
     89  inherited Destroy;
     90end;
     91
    8392procedure TDataFile.SetFileName(AValue: string);
    8493begin
Note: See TracChangeset for help on using the changeset viewer.