Path: utzoo!attcan!utgpu!watmath!maytag!watvlsi!fchan From: fchan@watvlsi.waterloo.edu (Francis Chan) Newsgroups: comp.lang.smalltalk Subject: Re: Smalltalk/V: adding new instance variable Message-ID: <4534@watvlsi.waterloo.edu> Date: 2 Aug 89 14:35:46 GMT References: <17@piyopiyo.hatori.t.u-tokyo.JUNET> <7030001@hpcupt1.HP.COM> <2225@trantor.harris-atd.com> Reply-To: fchan@watvlsi.waterloo.edu (Francis Chan) Organization: U. of Waterloo, Ontario Lines: 32 In article <2225@trantor.harris-atd.com> rsimonian@x102c.harris-atd.com (Simonian RP 66449) writes: >In article <7030001@hpcupt1.HP.COM> dclaar@hpcupt1.HP.COM (Doug Claar) writes: >>Smalltalk/V seems to leave things laying around for various reasons. To get >>rid of the instances, inspect object. Then inspect classPool. THEN, inspect > >OR, to get rid of all instances of a class FOO, evaluate: > FOO allInstances do: [:i | i become: String new] > >Richard P. Simonian 407/984-6006 Close. If FOO has subclasses and an instance of a subclass exists, then you will get the walkback window.... Unfortunately it doesn't say which subclass has the offending instance(s). So here's a blast'em all solution: FOO allSubclasses do: [ :sc | sc allInstances do: [ :i | i become: String new ]] (I hope your code isn't copy righted, Richard :-)). I'm still not happy with this though, since all we have done is made the instances into instances of String. If you then follow up with a modification to any superClass of String, well ... you know what happens... more headaches. There should be something to make the instances become nil (but we all know that does not work all too well ...). P.S. If you are absolutely desparate (and I do mean desparate) do this: Scheduler reinitialize. This will start you off with a nice clean slate... only the old Transcript window will show up. Francis Chan SWEN University of Waterloo