translated slava's old example to work with the latest objc vocabs
parent
08550f3a7d
commit
950e6d40ba
|
@ -0,0 +1,12 @@
|
||||||
|
! Copyright (C) 2006 Slava Pestov
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
|
||||||
|
IN: cocoa-speech
|
||||||
|
USING: cocoa objc objc-classes kernel ;
|
||||||
|
|
||||||
|
"NSSpeechSynthesizer" f import-objc-class
|
||||||
|
|
||||||
|
: say ( string -- )
|
||||||
|
NSSpeechSynthesizer -> alloc f -> initWithVoice: swap <NSString> -> startSpeakingString: ;
|
||||||
|
|
||||||
|
"Hello from Factor" say
|
Loading…
Reference in New Issue