unitAppEvents.pas 365 B

123456789101112131415161718192021222324
  1. unit unitAppEvents;
  2. {$mode objfpc}{$H+}
  3. interface
  4. type
  5. // Use "of object" so methods (e.g., TForm1.SaveBooksNow) can be assigned
  6. TNotifyProc = procedure of object;
  7. var
  8. OnBooksChanged: TNotifyProc = nil;
  9. procedure NotifyBooksChanged;
  10. implementation
  11. procedure NotifyBooksChanged;
  12. begin
  13. if Assigned(OnBooksChanged) then
  14. OnBooksChanged();
  15. end;
  16. end.