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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:53:24+00:00 2026-06-13T09:53:24+00:00

I have a two column NSTableView that I want to populate with entries grabbed

  • 0

I have a two column NSTableView that I want to populate with entries grabbed from a CSV file. Everything works fine except the title of each of the table cells isn’t set.

Here’s the function that is called for each row in the NSArray

- (void)populateTable:(NSString *)fname :(NSString *)lname {
    NSMutableDictionary *value = [[NSMutableDictionary alloc] init];
    [value setObject:[NSString stringWithFormat:@"%@", fname] forKey:@"first_name"];
    [value setObject:[NSString stringWithFormat:@"%@", lname] forKey:@"last_name"];

    [arrayController addObject:value];
    [value release];
    [fname_list reloadData];
    [lname_list reloadData];
}

The value of the “last name” column is bound to the Array Controller arrangedObjects.last_name and both “first_name” and “last_name” are listed as keys in the Array Controller > Object Controller > Keys list

The proper amount of table cells are created (3 entries in the CSV file = 3 rows in each column), but the title of each of the cells isn’t set (either to “first_name” or “last_name” depending on the column); the title of the cells just remains “Table View Cell”

Edit:

After using navinsillu’s changes I end up with the following function:

- (void)populateTable:(id)sender :(NSString *)fname :(NSString *)lname {
    [arrayController insert:sender];
    [[[self arrayController] selection] setValue:fname forKeyPath:@"first_name"];
    [[[self arrayController] selection] setValue:lname forKeyPath:@"last_name"];

    [fname_list reloadData];
    [lname_list reloadData];
}

And in my header I have

@property (retain,nonatomic,readwrite) IBOutlet NSArrayController *arrayController;

But I still get the same results: 3 rows/cells in each table column, all titled “Table View Cell”

Edit:

After some inspection I noticed that the Model Key Path under the Value bind for the table columns doesn’t have any entries. When I type in first_name or last_name it says No completions found even though the keys are listed in the Keys list in the array controller. Unfortunately I have no idea as to why it isn’t finding the keys.

Edit:

Odd. I tried deleting and adding the table view and array controllers but that didn’t work. However, creating a new project and doing the exact same things produces the expected results.

  • 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-13T09:53:25+00:00Added an answer on June 13, 2026 at 9:53 am

    Recreating the project exactly the same way as I had it produces what I was expecting to happen. I’m not sure why redoing it all worked, but it did.

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

Sidebar

Related Questions

I have NSTableView with two columns, and i wanna fill them entries from SQLite
I have a two column layout: http://jsfiddle.net/KqQ42/1/ Now I would like that the left
I have a two column site layout that has the content of the left
I have a two column dataframe in R and i want to add a
I have two tables: object that has object_id column and avalues that have object_id
I have a view-based NSTableView that usually has one column in it. However, at
i have NSTableView and two columns in it: NSTableColumn *column = [[[NSTableColumn alloc] initWithIdentifier:@custId]
suppose i have too table folder and file let Folder have two column ID
I have a two-column layout and I want the left column to stay put
I have a two column layout set up, and I want to have both

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.