Some of these initial queries will be pretty dumb, so I apologize advance.
The documentation says a lot about everything, except what I want to know
This is from Hillegas, creating an App called SpeechSynthesizer.
Setup. Window, an NSTextField, 2 NSButtons. The text in the field is spoken when the (Button) "Speak" is pushed.
An instance of AppController ( a class created for the app) has been placed in the .nib file and all outlets, methods have been connected correctly, as the App runs as it should.
Here are my queries.
In AppController.m this init is found.
1) Who calls this init?
In plain Obj-C, I would call this init with something like
MyClass *myC = [[ MyClass alloc..] initWithWhatever];
My **guess** is that all nib objects get sent an init on launch, but I would like to know that for sure.
2) As far as I can tell, the code
is not released. Is this intentional, or just an early explanation and all will be later explained?
Thanks as always.
The documentation says a lot about everything, except what I want to know
This is from Hillegas, creating an App called SpeechSynthesizer.
Setup. Window, an NSTextField, 2 NSButtons. The text in the field is spoken when the (Button) "Speak" is pushed.
An instance of AppController ( a class created for the app) has been placed in the .nib file and all outlets, methods have been connected correctly, as the App runs as it should.
Here are my queries.
In AppController.m this init is found.
Code:
-(id) init
{
[super init];
NSLog(@"init");
speechSynth = [[ NSSpeechSynthesizer alloc] initWithVoice: nil];
return self;
}
1) Who calls this init?
In plain Obj-C, I would call this init with something like
MyClass *myC = [[ MyClass alloc..] initWithWhatever];
My **guess** is that all nib objects get sent an init on launch, but I would like to know that for sure.
2) As far as I can tell, the code
Code:
speechSynth = [[ NSSpeechSynthesizer alloc] initWithVoice: nil];
Thanks as always.