Warning Class 'AppController' does not implement the 'NSSpee


#1

When building the speakline application I get the following warning.

Class ‘AppController’ does not implement the ‘NSSpeechSynthesizerDelegate’ protocol

What would one have to do to get that warning to go away?


#2

[quote=“jhgravelle”]When building the speakline application I get the following warning.

Class ‘AppController’ does not implement the ‘NSSpeechSynthesizerDelegate’ protocol

What would one have to do to get that warning to go away?[/quote]

I’d start with reading the errata :slight_smile:

I’d post a link but this forums seems to choke on utf8 chars, so just click through bignerdranch.com, I’m sure you’ll find it


#3

The code will run fine even with the compiler warning. I hate warnings because it is messy and tells me something is not 100%.

To fix the warning, you have to declare in the header file that you are implementing the the ‘NSSpeechSynthesizerDelegate’ protocol. Like so…

@interface AppController : NSObject <NSSpeechSynthesizerDelegate> {

        ...

}

This basically says, that the class name is “AppController” which inherits from NSObject class and adheres to the NSSpeechSynthesizerDelegate protocol.