Explorar o código

Fix OnBooksChanged type to accept methods (procedure of object)

- Allows assigning TForm.SaveBooksNow to OnBooksChanged without type mismatch
Codex CLI hai 4 meses
pai
achega
d78d6aa18c
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/unitAppEvents.pas

+ 2 - 2
src/unitAppEvents.pas

@@ -5,7 +5,8 @@ unit unitAppEvents;
 interface
 
 type
-  TNotifyProc = procedure;
+  // Use "of object" so methods (e.g., TForm1.SaveBooksNow) can be assigned
+  TNotifyProc = procedure of object;
 
 var
   OnBooksChanged: TNotifyProc = nil;
@@ -21,4 +22,3 @@ begin
 end;
 
 end.
-