Hi John,

On Tue, Nov 3, 2009 at 9:38 PM, John Delaney <[email protected]> wrote:
> Because I am a bit of a beginner, please let me know if because of my level
> of experience this email is inappropriate.

I am a newbie in ObjC too.

> Here is my very naive implementation:
> #import "TextToSpeech.h"
>
> int main (int argc, const char * argv[]) {
>     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
>
>     // insert code here...
>     NSLog(@"Hello, World!");
>
>     TextToSpeech * textToSpeech;
>     NSLog(@"0");
>     [textToSpeech init];
>
>     NSString * stext = @"hello world text";
>
>
>     [textToSpeech speakText:stext];
>
>
>     [textToSpeech dealloc];
>     //[phoneString dealloc];
>
>     [pool drain];
>     return 0;
> }

You need to allocate the memory first:

TextToSpeech *textToSpeech = [[TextToSpeech alloc] init];

And AFAIK you should use:

[textToSpeech release];

not dealloc.

Regards,
Marcelo


_______________________________________________
gnuspeech-contact mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnuspeech-contact

Reply via email to