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

  • Home
  • SEARCH
  • 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 6991411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:29:51+00:00 2026-05-27T19:29:51+00:00

My personal preference is the separation of code execution from interface objects. For example,

  • 0

My personal preference is the separation of code execution from interface objects.
For example, say I have a Soda class. The Soda class has properties such as weight, height, and a brand name.

Say I also have another class called “Brain”.

I want Brain to populate an NSTable with Soda objects, yet I only want my AppDelegate class to declare the interface objects.


AppDelegate.h

@interface AppDelegate : NSObject <NSApplicationDelegate>

@property (assign) IBOutlet NSTableView * sodaTable;

@end

Brain.m

@implementation Brain : NSObject

- (void)aquireCaffine
{
    /*   Do stuff here that populates the sodaTable  */
}

Any form of separation will do.
I also mean to say that I don’t want appDelegate to handle the call.
This means that I’d rather not do the following to AppDelegate.h:

[self aquireCaffineUsingTable:sodaTable];

Perhaps I’m doing something extremely not Objective-C oriented, but I have my preferences do I not?

  • 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-27T19:29:51+00:00Added an answer on May 27, 2026 at 7:29 pm

    You can have your app delegate only declare interface objects. At some point, you’ll need to set the table’s data source to an object which implements the table data source protocol (NSTableViewDataSource). That object fills out the table whenever the table’s -reloadData method is called. You can set the table’s data source in code or in Interface Builder. See the docs for more info.

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

Sidebar

Related Questions

This is probably a matter of personal preference, but when do you use properties
I'm learning to develop for iPhone without Interface Builder (a personal preference), and I'm
Or is it just mainly a personal preference? As a programmer I always use
I guess there may not be any difference but personal preference, but when reading
I have a message class that I use like so: RedirectMsg::go('somepage.php', MessageType::ERROR, 'Your message
Say I have a loop like this: for (int i = 0; i <
This might be a personal preference, but I'm bit used to do this kind
I have a particularly stupid insecurity about the aesthetics of my code... my use
Besides personal preference, does it make any difference? <?php $meta = get_post_meta(get_the_ID(), 'rw_strNum', true);
I have seen member functions programed both inside of the class they belong to

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.