NSSpeechSynthesizer delegate method not called in OCUint
NSSpeechSynthesizer delegate method not called in OCUint
- Subject: NSSpeechSynthesizer delegate method not called in OCUint
- From: Sean DeNigris <email@hidden>
- Date: Fri, 25 Jul 2008 21:14:39 -0400
Hi, I'm using OCUnit injected into my project executable in xCode to
test a class that contains an NSSynthesizer.
The following didFinishSpeaking method gets called when I run the app
normally, but not in the test.
- (id)init {
...
speechSynthesizer = [NSSpeechSynthesizer new];
[speechSynthesizer setDelegate:self];
...
}
- (void)speechSynthesizer:(NSSpeechSynthesizer*)sender
didFinishSpeaking:(BOOL)success {
[startButton setEnabled:TRUE];
[stopButton setEnabled:FALSE];
}
// the offending test method
- (void)testButtons {
...
[controller stopIt:nil];
// The two asserts fail because the delegate was never called
STAssertFalse([stopButton isEnabled], @"");
STAssertTrue([startButton isEnabled], @"");
}
Any ideas? Thanks!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden