#import "AppController.h" @implementation AppController - (id)init { [super init]; NSLog(@"init"); speechSynth = [[NSSpeechSynthesizer alloc] initWithVoice: nil]; return self; } - (IBAction)sayIt:(id)sender { NSString *string = [textField stringValue]; if ([string length] == 0) return; [speechSynth startSpeakingString: string]; NSLog(@"Have started to say: %@", string); } - (IBAction)stopIt:(id)sender { NSLog(@"Stopping"); [speechSynth stopSpeaking]; } - (void)dealloc { NSLog(@"dealloc"); [speechSynth release]; [super dealloc]; } @end