I'm trying to figure out how to declare both a record and a number of object events which use each other. The problem is no matter which way I declare them, I have an "undeclared identifier".
So with the code below, can I get them to use each other? The events will be used in an object, and the record will be passed and used into the object's constructor.
TMyEvent = procedure(Sender: TObject; var Rec: TMyRecord) of object;
TMyRecord = record
OnMyEvent: TMyEvent;
end;
Is this possible? It needs to work in all versions of Delphi 7 and up.