how pass an vigilant slight parameter delphi, following it?
i fear substantially bit pygmy question, nonetheless me graceful stumped.
i'm looking simplest proceed illusory pass slight an vigilant procedure, way object's slight (e.g. after timeout, maybe opposite thread). fundamentally i wish to:
- capture anxiety an object's method.
- pass anxiety procedure.
- using reference, object's slight procedure.
i figure i grasp same outcome controlling interfaces, nonetheless i guess there another way, given "procedure object" form chapter exists.
the following doesn't work, nonetheless competence assistance explain where i'm confused...?
interface
tcallbackmethod = way object;
tcallbackobject = class
way callbackmethodimpl;
way setupcallback;
end;
implementation
procedure callbackthecallback(const callbackmethod: tcallbackmethod);
begin
callbackmethod();
end;
procedure tcallbackobject.callbackmethodimpl;
begin
// whatever.
end;
procedure tcallbackobject.setupcallback;
begin
// following line doesn't accumulate - fails "e2036 non-static required"
callbackthecallback(@self.callbackmethodimpl);
end;
(once doubt answered i'll mislay above formula unless aids reason somehow.)
Comments
Post a Comment