Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!susser From: susser@Apple.COM (Joshua Susser) Newsgroups: comp.lang.smalltalk Subject: Re: How Do I Track Globals In Smalltalk/V? Message-ID: <53721@apple.Apple.COM> Date: 6 Jun 91 23:25:36 GMT References: <42944@cup.portal.com> Organization: Apple Computer Inc., Cupertino, CA Lines: 22 In <42944@cup.portal.com> Will@cup.portal.com (Will E Estes) inquires about cleaning up global variables. CWatts@BNR.CA (Carl Watts) supplies the expression (Smalltalk reject: [:each | each isBehavior]) keys as a way to find the names of all the non-class globals. This is great for finding the names, but (Smalltalk reject: [:each | each isBehavior]) inspect gives you an dictionary inspector on all non-class globals. Even better, since the associations in this dictionary are the same ones used in Smalltalk, the values are always current. Will, you should remember that setting a global to nil doesn't get rid of it - it's just left with a value of nil. To remove an obsolete global from the Smalltalk dictionary, use this: Smalltalk removeKey: #GlobalName. Joshua Susser, Object Percussionist Apple Computer, Advanced Technology Group inet: susser@apple.com | link: susser.j | bell: 408/974-6997 Macintosh Jr. - The power to crush the other kids.