Hey guys, I'm diligently going through Aaron Hillegass' book, and am stuck on Chapter 5, Helper Objects.
What I understand is that a lot of classes in Cocoa have an instance variable 'delegate' that points to the helper object. An example it gave was having the helper object tell the tableView how many rows to display. Also, it says that NSSpeechSynthesizer has a delegate method didFinishSpeaking:.
This kinda makes sense to me, but I guess the question I have, is why deal with helper objects at all? Why can't the NSSpeechSynthesizer class have an instance method isFinishedSpeaking that returns a boolean? What's with the middle man? Thanks!
What I understand is that a lot of classes in Cocoa have an instance variable 'delegate' that points to the helper object. An example it gave was having the helper object tell the tableView how many rows to display. Also, it says that NSSpeechSynthesizer has a delegate method didFinishSpeaking:.
This kinda makes sense to me, but I guess the question I have, is why deal with helper objects at all? Why can't the NSSpeechSynthesizer class have an instance method isFinishedSpeaking that returns a boolean? What's with the middle man? Thanks!