소스 검색

Fix OnBooksChanged type to accept methods (procedure of object)

- Allows assigning TForm.SaveBooksNow to OnBooksChanged without type mismatch
Codex CLI 4 달 전
부모
커밋
d78d6aa18c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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.
-