cardinal@ssc-vax.UUCP (Ralph Cardinal) (07/31/89)
I know this has probably been asked before, but there is nobody near me that uses or knows Smalltalk/V. My question is how to rid my Smalltalk/V environment of all instances of a class in order to add/change the instance variables declaration of the class. I keep on getting a walkback window with "Has Instances". I have done the following, with no luck: ClassName allInstances I performed a 'Show It', and there were indeed instances. I iterated over all the instances, and using a become: '' was able to get the above expression to evaluate to an empty collection. But the system still reports that the ClassName has instances, even though the allInstances reports there are none. I really would like to remove all the instances of a class. Is there an easier way? The Smalltalk/V manual simply says to delete all instances before changing the class but does not mention how. Is there a better way to delete the instances of a class? And why does the system report that there are no instances with the "ClassName allInstances", yet when I try to save the changed class with more instance variables, I get a "Has Instannces" walkback window? Any help would be appreciated. E-mail is fine. Thanks in advance, Ralph Cardinal
kanner@Apple.COM (Herbert Kanner) (08/02/89)
In article <2827@ssc-vax.UUCP> cardinal@ssc-vax.UUCP (Ralph Cardinal) writes: > > I know this has probably been asked before, but there is > nobody near me that uses or knows Smalltalk/V. My question > is how to rid my Smalltalk/V environment of all instances of > a class in order to add/change the instance variables > declaration of the class. I, too would like to know how to do this, so please post the answer or copy me on the Email. Thanks. -- Herb Kanner Apple Computer, Inc. {idi,nsc}!apple!kanner kanner@apple.com
lpj@hpctdlu.HP.COM (Laura Johnson) (08/03/89)
Try this: ClassName allInstances do: [ :i | i become: String new]