'From Squeak3.7alpha of ''11 September 2003'' [latest update: #5423] on 30 September 2003 at 6:37:05 pm'! "Change Set: ClassBindingRemovalRenameV2 Date: 15 September 2003 Author: Daniel Vainsencher and David T. Lewis SystemDictionary>>removeClassFromSystem:logged: should be called only Class removeFromSystem, and has been used erronously. This changeset renames it to forgetClass:logged:, which I hope reveals the intention of removing a class from various lists, and is less likely to be misunderstood. The old method is deprecated documenting the proper way to do things. md: merged with changeset ClassRemovalRename-edits-dtl Date: 16 September 2003 Author: David T. Lewis Minor edits to the ClassBindingRemovalRename change set by Daniel Vainsencher, 15 September 2003. Sorry I have not figured out the BFAV yet, so I'm sending my comments in a change set. Class>>removeFromSystem has unnecessary formatting changes. Should be a one-word change to the method. Changed it back so that the only thing that changes is the call to #forgetClass:logged:. Fixed typo in the comment for SystemDictionary>>removeClassFromSystem:logged: (s/SsytemDictionary/SystemDictionary/). I think that #forgetClass:logged: is a good choice for the method name. It conveys the intent of the method without setting incorrect expectations. In most cases, I would not expect that the deprecated method should have its behavior changed, but think the way it is being done here makes a reasonable choice on behalf of the user, so let's go with it. - Dave "! !Class methodsFor: 'initialize-release' stamp: 'dtl 9/16/2003 22:08'! removeFromSystem: logged "Forget the receiver from the Smalltalk global dictionary. Any existing instances will refer to an obsolete version of the receiver." "tell class to deactivate and unload itself-- two separate events in the module system" self deactivate; unload. self superclass ifNotNil: ["If we have no superclass there's nothing to be remembered" self superclass addObsoleteSubclass: self]. self environment forgetClass: self logged: logged. self obsolete! ! !SystemDictionary methodsFor: 'class names' stamp: 'dvf 9/15/2003 11:29'! forgetClass: aClass logged: aBool "Delete the class, aClass, from the system, but log the removal neither to the current change set nor to the changes log. Note that this doesn't do everything required to dispose of a class - to do that use Class>>removeFromSystem." aBool ifTrue: [aClass wantsChangeSetLogging ifTrue: [ChangeSet current noteRemovalOf: aClass]. aClass acceptsLoggingOfCompilation ifTrue: [Smalltalk logChange: 'Smalltalk removeClassNamed: #' , aClass name]]. SystemOrganization removeElement: aClass name. self removeFromStartUpList: aClass. self removeFromShutDownList: aClass. self removeKey: aClass name ifAbsent: []. self flushClassNameCache! ! !SystemDictionary methodsFor: 'deprecated' stamp: 'dtl 9/16/2003 22:11'! removeClassFromSystem: aClass logged: aBool "Delete the class, aClass, from the system, but log the removal neither to the current change set nor to the changes log" self deprecatedExplanation: 'This method has been renamed because using it directly was usually insufficient (and a bug). You probably want to use aClass removeFromSystem, and that is what happens if you proceed. If you''re sure you want to remove the class from various registries but not do other finalization, call the method SystemDictionary>>forgetClass:logged:.'. ^aClass removeFromSystem. ! !