Re: NSSpeechSynthesizer delegate method not called in OCUint

2008-07-26 Thread Omar Qazi

On Jul 25, 2008, at 6:14 PM, Sean DeNigris wrote:

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.


This is because, ostensibly (I don't know what the controller's stopIt  
method does, but I can imagine), the speech synthesizer never started  
speaking any text. If you stop the Speech Synthesizer before it starts  
speaking any text, it's not going to call that delegate method.


Omar Qazi
Hello, Galaxy!
1.310.294.1593



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

NSSpeechSynthesizer delegate method not called in OCUint

2008-07-25 Thread Sean DeNigris
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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]