Announcements framework replaces the aging triggerEvent system with fully object-oriented representation of announcements (events) as instances, similar to Exceptions. The framework is smaller and faster than triggerEvent, with a smaller API (the selectors in bold below are in fact the complete API) that supports a broader set of actions.
Announcements will be the event transport layer of Pollock, the future VisualWorks UI framework.
The framework is included as preview in VisualWorks 7.4, and the most up-to-date version is also available from the Open Repository.
The most comprehensive description of the framework at the moment is a series of posts in Vassili Bykov's blog:
- Introducing Announcements - a high-level overview and answers to common questions.
- Subscribing and Receiving - describes when:do:, when:send:to:, and the interpretation of announcement subclass/superclass relationship.
- Unsubscribing - describes unsubscribe:, unsubscribe:from:, and when:do:for:.
- Announcing and Vetoing and API Update: R.I.P. veto. The first of these posts describes announce:, while the second explains why the explicit vetoing support (announce:ifVetoed: and veto) has later been removed and left as a pattern to be implemented by the user when needed.
- Subscription Management explains the role of SubscriptionRegistry and the messages subscriptionRegistry, subscriptionRegistry: and subscriptionRegistryOrNil.
- Advanced Announcements, part 1 describes subscription selection protocol of SubscriptionRegistry: allSubscriptions, subscriptionsFor:, subscriptionsOf: and subscriptionsOf:for:.
- Advanced Announcements, part 2 explains suspendWhile:.
- Advanced Announcements, part 3 explains suspendWhile:ifAnyMissed: and interceptWith:while:.
- Advanced Announcements, part 4 describes the optional weak subscription support and the ways to make individual or all subscriptions weak or strong (messages described are makeWeak, subscriptionClass: and makeStrong).
- Advanced Announcements, part 5 discusses the current position on announcement declarations.
- Counting the Chickens compares performance and implementation size of triggerEvent and Announcements.
- Bring Your Own SubscriptionRegistry details the change in version preview-28 dropping the ability of an arbitrary object to remember subscriptions.