Cześć. Kwestia jest taka. Mam 3 unity: fMain, uDevices i uClasses
w uClasses mam zdefiniowany typ:
TCzytnikRead = procedure(Sender: TObject; Str: string) of object;
w uDevices mam procedurę:
function SetCzytnikKart(AOwner: TComponent; var Proc: TCzytnikRead): boolean;
begin
//jakiś inny kod
CzytnikKart.OnCzytnikRead:=Proc;
//więcej innego kodu
end;
Natomiast w fMain chcę tą procedurę wywołać:
SetCzytnikKart(Self, CzytnikRead);
Deklaracja CzytnikRead:
procedure CzytnikRead(Sender: TObject; Str: string);
Wyskakuje mi błąd: Types of actual and formal var parameters must be identical
Co tu jest nie tak?