How to perform a specific action when a class is removed from system in Dolphin

134 Views Asked by At

I'd like to perform a specific action just before/after a class is removed from system (from SystemDictionary) - like unregistering the class from a certain list/dictionary of well known classes.

In Visualworks and Squeak/Pharo, I just have to define the message #obsolete at class side.

obsolete
    self unregisterSomething.
    ^super obsolete

Is there an equivalent in Dolphin Smalltalk?

1

There are 1 best solutions below

0
bruno bb On BEST ANSWER

You have to check the method #uninitializeBeforeRemove.

If your class is BankAccount then you have to implement:

BankAccount class>>uninitializeBeforeRemove

(implement it in the class side).

Read the comments at Class>>uninitializeBeforeRemove