= Solution
A widget or model implementing `Publisher` is the subject. It calls `publish(event)` when an observable change occurs. An interested `Reactor` subscribes with `listenTo(subject)`, and adds a <partial function> to `reactions` that handles the event types it understands. `deafTo(subject)` ends that subscription when it is no longer needed.
The connection is therefore made through publisher and reactor interfaces rather than through a hard-coded <list> of particular application classes. A reactor may observe several publishers and inspect an event's source to distinguish them. The implementation's registration machinery delivers published events to interested reactions; registering a reaction alone is not a substitute for subscribing to the source.<Scala Swing event-system documentation>[Official library README, event-system description; Reactor API entries listenTo, deafTo and reactions]{ref}
For the converter, the three text fields are publishers and the frame is a reactor. Register the three fields once, then handle their edit-completion events to update the stored numeric state and refresh the appropriate displayed values.
Back to article page