Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 746851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:08:17+00:00 2026-05-14T14:08:17+00:00

Like many people I’m interested on Objective – C and Cocoa programming. I know

  • 0

Like many people I’m interested on Objective – C and Cocoa programming. I know conceptually what a delegate it is but I don’t understand how to use them or when to use them. Here is some example code:

#import "AppControler.h"


@implementation AppControler

-(id)init
{
    [super init];
    NSLog(@"init");

    speechSynth = [[NSSpeechSynthesizer alloc] initWithVoice:nil];
    //
    [speechSynth setDelegate:self];
    voiceList = [[speechSynth availableVoices] retain];

    return self;
}

I’m setting the AppControler to be the delegate of the speechSynthasizer. Which means that the speechSynthasizer is telling hte AppControler what to do.
But I don’t understand this line:
[speechSynth setDelegate:self];

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:08:17+00:00Added an answer on May 14, 2026 at 2:08 pm

    self is the current object, so [speechSynth setDelegate:self] sets the delegate of the speechSynth object to the current object, i.e. your AppControler (sic) instance.

    Edit: In addition to the code shown, your AppControler should implement the NSSpeechSynthesizerDelegate protocol for the messages you wish to delegate to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Like many people here, I started my programming experience with the good ol' green
Like many people I've been doing image preload for a long time, but not
Like many other people posting questions here, I recently started programming in Python. I'm
I have seen the trend that many people don't like to use exceptions in
I would like to know how many people view my web page. I am
Like many people, I have several SVN repositories that contains several projects. I've decided
In asking around and doing some research, it seems like many people are really
I use only classes and never use IDs. Many people like to use IDs
Update As suggested by many people, it looks like this was because of the
It seems like a lot of people here and on many programmer wikis/blogs/ect. elsewhere

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.