Frage

I have tried to load some code that uses

SystemChangeNotifier notify: self
ofSystemChangesOfItem: #class
using: #method.

I know this should be changed to SystemAnnouncer however this class seems to require you to register for each different possible change, i.e. classAdded:, methodAdded: etc.

What is the equivalent of the above code that notifies on all changes?

War es hilfreich?

Lösung

AFAICT that's no longer possible. I think it was a conscious decision to drop unspecified, general notifications for specific ones. In your case specifically this might be a bit of a bummer but in general it means that subscription to specific change events is much easier, and there are less announcements because the notification object knows what change it represents. Previously the subscriber would be notified about all changes and would have to create a set of checks to filter unwanted ones.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top