Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!snorkelwacker!spdcc!merk!alliant!linus!sdl From: sdl@linus.mitre.org (Steven D. Litvinchouk) Newsgroups: comp.lang.smalltalk Subject: Re: Show a method name Message-ID: Date: 16 Jul 90 22:10:06 GMT References: <20310@grebyn.com> Sender: usenet@linus.mitre.org Organization: The Mitre Corporation, Bedford, MA Lines: 31 In-reply-to: schultz@grebyn.com's message of 13 Jul 90 12:00:10 GMT In article <20310@grebyn.com> schultz@grebyn.com (Ronald Schultz) writes: > I have a method, and all I want to do is have the method return it's > name.... > How do I do this ? In ParcPlace Smalltalk-80, inside a given method, the expression thisContext selector will return the selector of the currently executing method, and thisContext sourceCode will return its source code. It works because 'thisContext' is a context variable that holds the currently executing method or block context. Perhaps some equivalent thing can be done in Smalltalk/V ? -- Steven Litvintchouk MITRE Corporation Burlington Road Bedford, MA 01730 (617)271-7753 ARPA: sdl@mbunix.mitre.org UUCP: ...{att,decvax,genrad,ll-xn,philabs,utzoo}!linus!sdl "Where does he get those wonderful toys?" -- J. Napier (a.k.a. "The Joker")