Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!ut-sally!husc6!mit-eddie!genrad!decvax!decwrl!pyramid!prls!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP Newsgroups: comp.lang.smalltalk Subject: Re: Smalltalk/V question Message-ID: <1981@mmintl.UUCP> Date: Mon, 16-Feb-87 21:38:04 EST Article-I.D.: mmintl.1981 Posted: Mon Feb 16 21:38:04 1987 Date-Received: Thu, 19-Feb-87 21:38:34 EST References: <3060@gitpyr.gatech.EDU> Reply-To: franka@mmintl.UUCP (Frank Adams) Distribution: world Organization: Multimate International, E. Hartford, CT Lines: 28 Keywords: Smalltalk/V In article <3060@gitpyr.gatech.EDU> krubin@gitpyr.UUCP (Kenny Rubin) writes: >QUESTION: how does one determine the names of instances that > have been created for a given class by application > of the 'new' method selector? > >PROBLEM: when I make a modification to a given class, ..., I cannot > save the modification (from the ClassHierarchyBrowser). > Attempting to do so results in a window popping up that > says "Has Instances". The solution to the problem seems > to be to find all instances of the class (or subclass) > and set them equal to something other than an object of > the class I am trying to modify. Unfortunately, I can't > seem to be able to locate the names, and more so, who > is using them (containing the names). There is no facility in the system to identify all these references. Even if there were, this would not suffice, since many objects do not have names which can be assigned to. (Most objects are instance variables for other objects, and as such can only be assigned by methods for their class. Further, some are predefined by the system.) The general solution is to create a new value for each instance, and to use the become: message to change the instance to the new value. Care must be taken in this process; if you do not understand the Smalltalk data model, you are very likely to break something. Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Ashton-Tate 52 Oakland Ave North E. Hartford, CT 06108