If I'm reading what you wrote correctly, you seem to think there's only one delegate in the entire app. This is incorrect. Delegation is a pattern: it identifies a relationship between two objects. That pattern is used in many different classes, to accomplish many different things.
Hi Chown,
Well...maybe my understanding is not full yet. But, as i understand it, a single object can only have one delegate. So, if you set ObjectB as a delegate of ObjectA ( in IB), and *then* you wish to make ObjectC respond to certain notifications of ObjectA, you cannot make ObjectC a delegate of ObjectA as well, but you **can** register ObjectC with the notificationCenter to receive notifications for those changes you are interested in?? If this is not correct, and it may well be, then I would like to hear your input, as this seems to be the case as described by the OP.
Part of the confusion here is that Hillegass gives a really obfuscated explanation of delegation and notifications on page 213. Here is what he says.
If a standard Cocoa object has a delegate and posts notifications, it is automatically registered as an observer for the methods the object implements. If you are implementing such a delegate, how would you know what to call the method.
I assume that both *it* and *the object* refer to the delegate.
The problem is that prior to this sentence, he was talking about adding observers, so one does not assume he has suddenly changed track. If one looks at the book's site, quite a few are confused by this, ( maybe even including me

) So, the challenge would seem to indicate that all one needs to do is simply implement the method, and it should work. I have not done this exercise in a while, but the OP is correct in that the AppController was indeed made a delegate of "file's owner" which in this case was NSApplication. So, going by the logic of the previous discussion, it would seem to indicate that simply implementing the methods *should* be the only things needed. Interested in your input, before I go back and redo the exercise.