Board index » delphi » Finding Component Name from Called Function/Procedure

Finding Component Name from Called Function/Procedure

Is it possible to find the name of a component that calls a method?

For example, if Button1.Click invokes Method.Test.  Is is possible for
Method.Test do find out which form and object invoked it?  I would like
to find that "Button1" invoked the method.

 

Re:Finding Component Name from Called Function/Procedure


On Wed, 20 Nov 1996 11:38:06 -0800, Paul Wacker <rosew...@pe.net>
wrote:

Quote
>Is it possible to find the name of a component that calls a method?

>For example, if Button1.Click invokes Method.Test.  Is is possible for
>Method.Test do find out which form and object invoked it?  I would like
>to find that "Button1" invoked the method.

You should have Method.Test accept a parameter of type TObject.  Then
you can pull the name from the parameter.  And calling the method;
Method.Test(Self)

Jason Swager

Other Threads