views:

20

answers:

1
printThisMethodSig: aSomething
stack := thisContext stackOfSize: 2.
Transcript show: (stack at: 2); cr.

stack at: 2 returns the method context of the current method. It is possible to retrieve the compiled method of the current method using method message. I want to be able to print the whole signature of the method, for example: from:to:. I looked at both MethodContext and CompiledMethod classes but could not find out how to do it.

Thank you.

+1  A: 

You can use the selector message to retrieve the name of a CompiledMethod.

Oak