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 446669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:29:37+00:00 2026-05-12T21:29:37+00:00

Usually, when we have to link an interface element to a field of a

  • 0

Usually, when we have to link an interface element to a field of a class, we use the keyword ‘IBOutlet’ to inform the pre-copiler:

@interface MyController : NSObject {
    IBOutlet NSWindow *theWindow;
}

and in the implementation we use directly the pointer theWindow to call methods of the class NSWindow!

But what are the advantages of tell to the pre-compiler to create some accessors to the object that is pointed by “theWindow” and manage the object through the accessors?

Example:

@interface MyController : NSObject {
   NSWindow *theWindow;
}
@property(retain) IBOutlet NSWindow *theWindow;


@implementation MyController

@synthesize theWindow;

@end

Does the use of the second solution (for all the pointers to interface’s elements) slows the performances of the application?

When is it a good practice to use the second way instead of the first?

Thank you!

  • 1 1 Answer
  • 0 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-12T21:29:38+00:00Added an answer on May 12, 2026 at 9:29 pm

    Well in general I don’t retain the properties, and the only way I ever even expose Outlets is if something needs to access an element from the outside, and this is generally a bad sign for your design anyway.

    I’ve not tried it but I’d be tempted to only synthesis the read portion, and I’d probably only use it in places where atomic access where important. Some portions of AppKit aren’t always threadsafe.

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

Sidebar

Related Questions

I'm posting a PDF at a website and have a link pointing to it,
We have lots of javascript functions, which are usually handled via the onclick function.
I don't usually deal in exclamation points, but I have hours before this goes
I have two lists based on the same class. I would like one list
I need to use an Entity framework with my application, and I have used
I have a question about the event dispatch. I am trying to write the
I have a software that runs over 2 000 computers on my company, without
I have a problem with a site I am redesigning and the problem is
I have a client who is requesting an HTML-formatted email to promote an event.
Folks, I am completely new to jQuery and JqGrid both. Usually I take some

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.