4

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?

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
aka.nice
  • 9,100
  • 1
  • 28
  • 40

1 Answers1

4

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

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
bruno bb
  • 152
  • 9