KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've encountered some code that's new to me... I've never really seen a type declaration of a procedure of object , and I just don't see the point. Why couldn't the developer simply keep a field of type Boolean? interface type TFinishedCaptureEvent = procedure(AFinished: Boolean) of object; TFrameCard = class(TFrame) ... private FOnFinishedCapture: TFinishedCaptureEvent; procedure DoUpdateMessage(AMessageType: TMessageType); public property OnFinishedCapture: TFinishedCaptureEvent read FOnFinishedCapture write FOnFinishedCapture; end; implementation ... procedure TFrameCard.DoUpdateMessage(AMessageType: TMessageType); begin if Assigned(FOnFinishedCapture) then FOnFinishedCapture(False); ... end; end.
Tags (comma-separated)
Save Edits
Cancel