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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:13:08+00:00 2026-06-08T19:13:08+00:00

Disclaimer: I’ve been learning Objective C/Cocoa for 2 months or so, and I promised

  • 0

Disclaimer:
I’ve been learning Objective C/Cocoa for 2 months or so, and I promised myself that I would always try and find the answer myself rather than clogging the internet with dumb noob questions. At this point I’m just confused all over and I think I would benefit at this point from asking questions. I apologize in advance.

Problem:
I’m trying to write a master-detail style app (this is just for practice) called “My Dream Garage”. Basically I want to store car objects and their properties. I have a “Car” class that looks like this:

#import <Foundation/Foundation.h>

@interface Car : NSObject
@property (nonatomic, strong) NSString *brand, *model, *trimLevel;
@property (nonatomic, strong) NSNumber *modelYear, *engineSizeinL, *weight;
@property (nonatomic, strong) id image;
@end

In my main .XIB file I have an NSTableView and a bunch of text labels that will display each property (and an imagewell for the image).

My question is how do I store this data? I understand what NSArray, NSDictionary, ArrayController and DictionaryController are individually. I’m just a little confused on how to make them work together. When I add a new “car”, am I supposed to instantiate a new “Car” object with it’s properties? At that point do I add the new object to an array and then release the created “Car” object? Do I link the tableview and text-labels to an NSDictionary Controller? I’m not even sure what I should be asking at this point.

Perhaps I’m in a bit over my head. What other than Apple’s documentation (which is very good but too verbose for an amateur) would be recommended to learn how to create apps similar to this?

Any help is greatly appreciated. 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-06-08T19:13:09+00:00Added an answer on June 8, 2026 at 7:13 pm

    Lots of questions here:

    Are you wanting to store them somewhat permanently? If so, you need to start learning Core Data.

    What does the implementation file look like for the Car class? How are you (or are you) instantiating and initializing a new object?

    My class objects usually look something like this:

    Interface:

    @interface UserInfo : NSObject {
        NSString *_networkID;
        NSString *_displayName;
        NSString *_userDomain;
        BOOL _loggedIn;
    }
    @property(nonatomic,strong) NSString *networkID;
    @property(nonatomic,strong) NSString *displayName;
    @property(nonatomic,strong) NSString *userDomain;
    @property(nonatomic) BOOL loggedIn;
    
    -(id) initWithUserNetworkID:(NSString *)networkID 
                    displayName:(NSString *)displayName  
                     userDomain:(NSString *)userDomain;
    
    @end
    

    Implementation:

    #import "UserInfo.h"
    
    @implementation UserInfo
    
    @synthesize networkID = _networkID;
    @synthesize displayName = _displayName;
    @synthesize loggedIn = _loggedIn;
    @synthesize userDomain = _userDomain;
    
    
    -(id) initWithUserNetworkID:(NSString *)networkID 
                    displayName:(NSString *)displayName 
                     userDomain:(NSString *)userDomain {
    
        if ((self = [super init])) {
            _networkID = [networkID copy];
            _displayName = [displayName copy];
            _userDomain = [userDomain copy];
            _loggedIn = YES;
        }
    
        return self;
    }
    
    @end
    

    And I will create a new one with code like this:

    UserInfo *myUserInfo = [[UserInfo alloc] 
                                    initWithUserNetworkID:[loginDictionary objectForKey:@"NetworkID"]  
                                    displayName:[loginDictionary objectForKey:@"DisplayName"] 
                                    userDomain:[loginDictionary objectForKey:@"UserDomain"]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Disclaimer, I'm not a PHP programmer, so you might find this question trivial. That's
Disclaimer: I am a layperson currently learning to program. Never been part of a
Disclaimer: I'm sure this has been answered before but I cannot find anything on
Disclaimer: I'm a rails n00b. I'm playing around with a simple helper function that
Disclaimer : I'm quite a novice to RoR, but not with Ruby (if that
Disclaimer: I've looked through all the questions I can find and none of them
Disclaimer: JS novice I have a JS widget that depends on JQuery. The widget's
Disclaimer : this is a strange issue that only happens in a Kindle Fire
Disclaimer: I'm new to unit testing and just getting my feet wet. That being
DISCLAIMER: Don't use ::feof() as your loop condition. For example, see the answer 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.