April 2015
Intermediate to advanced
556 pages
17h 47m
English
You are now ready to add notifications to Chatter. Here is the game plan you will follow for doing that: Each window controller will post a notification whenever the user sends a message. All of the window controllers will observe these notifications. When they observe one, they will update their text views to display the new message.
To begin, create two constant strings at the top of ChatWindowController.swift.
import Cocoa
private let ChatWindowControllerDidSendMessageNotification
= "com.bignerdranch.chatter.ChatWindowControllerDidSendMessageNotification"
private let ChatWindowControllerMessageKey
= "com.bignerdranch.chatter.ChatWindowControllerMessageKey" class ChatWindowController: NSWindowController ...