|
From: <pet...@ka...> - 2003-12-07 05:33:51
|
Hi,
Could someone provide me an example of how to properly use/specify a
delegate to the NSSpeechSynthesizer class? I can't seem to get any
delegate method that has more than one argument to work. For example,
here is one of the several methods that I've tried:
class MyDelegate < OSX::NSObject
def speechSynthesizer_didFinishSpeaking_(sender, flag)
puts "Made it to the delegate"
end
end
synth = OSX::NSSpeechSynthesizer.alloc.init
synth.setDelegate(MyDelegate.alloc.init)
synth.startSpeakingString("This is a test")
sleep 10
Thanks!
Pete
|