Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcnc!unc!steele From: steele@unc.cs.unc.edu (Oliver Steele) Newsgroups: comp.lang.smalltalk Subject: Re: finding instances Message-ID: <699@unc.cs.unc.edu> Date: Fri, 26-Jun-87 16:59:06 EDT Article-I.D.: unc.699 Posted: Fri Jun 26 16:59:06 1987 Date-Received: Sat, 27-Jun-87 10:37:55 EDT References: <470@cup.portal.com> Reply-To: steele@unc.UUCP (Oliver Steele) Distribution: world Organization: University of North Carolina, Chapel Hill Lines: 19 In article <470@cup.portal.com> tony_mak_makonnen@cup.portal.com writes: >I am having trouble findind the names of instances I created under >Smalltalk/V . Is there a procedure that does that ? or must I document >every instance I create ? Any help appreciated . 'MyClass allInstances' will return a collection of all instances of MyClass, and 'MyClass allInstancesDo:' is the corresponding enumerator. If you're just looking for globals, use 'Smalltalk select: [ :instance | instance class == MyClass]', and substitute 'Undeclared' or a pool name for Smalltalk to look in the corresponding dictionary. Something on the order of '(Smalltalk select: [:i|i class == MyClass]) inspect' is most convenient if you have a dictionary inspector. ------------------------------------------------------------------------------ Oliver Steele ...!{decvax,ihnp4}!mcnc!unc!steele steele%unc@mcnc.org "They're directly beneath us, Moriarty. Release the piano!"