This changeset (two methods) introduces a hook method when removing a class from the system. The hook method is called lastActionBeforeRemoveFromSystem. The point of introducing it is that without it developer of classes which needs to performed some actions before been removed from the system have to specialize removeFromSystem: on their class and not forget to call the overriden method using a super removeFromSystem:. This hook frees the developer from this responsibility and makes then the system safer. We will need that when unloading classes or modules.
lastActionBeforeRemoveFromSystem "This hook lets a class performs a last action before being removed from the system whitout letting the responsibility to the developer to invoke super removeFromSystem: which is the case when we specialize directly removeFromSystem: sd-15Nov01"
"Do nothing"! !
!Class methodsFor: 'initialize-release' stamp: 'SD 11/15/2001 22:19'! removeFromSystem: logged "Forget the receiver from the Smalltalk global dictionary. Any existing instances will refer to an obsolete version of the receiver."
self lastActionBeforeRemoveFromSystem. self superclass ifNotNil:[ "If we have no superclass there's nothing to be remembered" self superclass addObsoleteSubclass: self]. self environment removeClassFromSystem: self logged: logged. self obsolete! !
squeak-dev@lists.squeakfoundation.org