Hi guys. Is there a way to obtain a pointer to a function that is inside a class?
For example:
//////////////////////////////////////////////////////////////
type
Tteste = class(TControl)
private
protected
public
function myFunction(var1: Integer): Boolean;
function OtherFunction: Boolean;
published
end;
function Tteste.OtherFunction: Boolean;
var p: Pointer;
begin
p:= @myFunction; // Here
end;
function Tteste.myFunction(var1: Integer): boolean;
begin
end;
//////////////////////////////////////////////////////////////
This code doesn't work. But If I declare myFunction as a global Function (not Class function), it works.
Is there a way to do this ?
Thank you.
Bookmarks