Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!pacbell.com!pacbell!osc!tma From: tma@osc.COM (Tim Atkins) Newsgroups: comp.lang.smalltalk Subject: Re: Show a method name Keywords: V/286 Message-ID: <3066@osc.COM> Date: 17 Jul 90 08:06:46 GMT References: <20310@grebyn.com> Reply-To: tma@osc.UUCP (Tim Atkins) Organization: Object Sciences Corp., Menlo Park, CA Lines: 23 In article <20310@grebyn.com> schultz@grebyn.com (Ronald Schultz) writes: >Hopefully this is a simple question. > >I have a method, and all I want to do is have the method return it's >name. For a class I would simply say > >^self class name. > >How do I do this ? > >Thanx. > >schultz@grebyn.com I don't have a Smalltalk-80 handy but the symbol for the method selector can be found in Smalltalk V by ^(self class selectorFor:(Process copyStack methodAt:0)) key Although this is obviously woefully inefficient, I hope it provides a clue. - Tim