[Lazarus] List the procedures of a object.

Sven Barth pascaldragon at googlemail.com
Wed Mar 28 11:11:48 CEST 2012


Am 27.03.2012 19:23, schrieb Everton Vieira:
> Well, i manage to 'find' the procedure now is giving the SIGSEV when
> is executed.
> For the MethodAddress finds was need to be published.

Note: It is sufficient if you enabled $M only for specific classes. 
Descendents of TPersistent (e.g. TControl, TComponent, TForm, etc) all 
have it enabled by default.

E.g.

{$M+}
TTeste = class

end;
{$M-}

Also your code is wrong. You wrote:

Proc := TProc(Sender.MethodAddress('Proc')^);

but it should be

Proc := TProc(Sender.MethodAddress('Proc'));

Note the missing "^"! (a procedural variable IS a method address)

Regards,
Sven




More information about the Lazarus mailing list