Qual método chamou outro método?

09/07/2004

0

Olá pessoal!

Tenho um método ´X´ (por exemplo).
Esse método é chamado por vários outros métodos (TForm1.Button1.Click, TForm1.Button2.Click, TForm2.Button1.Click, etc. )
Queria saber como eu faço pra saber qual método chamou esse método X!

Se alguém pode ajudar, eu agradeço!


Nglauber

Nglauber

Responder

Posts

09/07/2004

Beppe

Passe mais um parâmetro, por exemplo, uma string: ´método 1´.


Responder

09/07/2004

Rômulo Barros

Verifique:

[color=red:8d024f10d7]Returns a string containing the name of the method located at Address.

class function MethodName(Address: Pointer): ShortString;

Description

MethodName is used internally by the streaming system. When an event property is written to a stream, MethodName converts a pointer containing the method address to a string containing the method name. There should be no need to call MethodName directly.

If Address does not point to a published method of the object, MethodName returns an empty string.[/color:8d024f10d7]

Veja também:

[color=red:8d024f10d7]Returns the address of a published method.

class function MethodAddress(const Name: ShortString): Pointer;

Description

MethodAddress is used internally by the streaming system. When an event property is read from a stream, MethodAddress converts a method name, specified by Name, to a pointer containing the method address. There should be no need to call MethodAddress directly.

If Name does not specify a published method for the object, MethodAddress returns nil.[/color:8d024f10d7]


Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar