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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:29:10+00:00 2026-06-08T14:29:10+00:00

In my MainController, there’s a persons array, which binds to a NSArrayController. The persons’s

  • 0

In my MainController, there’s a persons array, which binds to a NSArrayController. The persons’s name are displayed in a table name column. If I bind a button to NSArrayController add method, I can add the button to add a new person, but if add the new person in method, the the tabel doesn’t show the new person, I don’t know why.

enter image description here

my code to add new person

Person *p =[[Person alloc]init];
[self.persons addObject:p];

UPDATE:
I know the answer by http://chanson.livejournal.com/85659.html
because NSMutableArray addObject isn’t KVC, so I need to use

  [[self mutableArrayValueForKey:@"persons"] addObject:person];
  • 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-08T14:29:11+00:00Added an answer on June 8, 2026 at 2:29 pm

    If self.persons in the line [self.persons addObject:p] is referring to the array, then you need to add the line self.persons = persons; after it to have the table be updated. I’ve never been quite sure why this is necessary, presumably, it has to do with KVO.

    If, on the other hand, self.persons refers to the array controller, then it should work as you have it written, since adding an object to the array controller is adding it to its arranged objects, which the table column is bound to. Doing it that way also updates the array, since it is bound to the array controller.

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

Sidebar

Related Questions

On my controller I have it inherit a MainController and there I override the
Inside the Sharekit 's SHK file, there's a function called ShowViewController which bring the
I have Simple java program named MainController.java. Wehn I try to compile it from
I've tried to mark multiple locations on my mapview. There is, a class extends
Is a MainController.xib file required for every iOS project? Reason I ask is because
What I'm trying to do I'm trying to add edit-in-place functionality to the Connection
Is there some way to use multiple instances of TTPickerTextField in one TTMessageController? I
I am having trouble getting phone numbers from the iPhone Addressbook. There is no
I have made this controller, which should be used to send emails. I need
I am developing a website using Asp.Net MVC framework. We need to add general

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.