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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:10:00+00:00 2026-05-22T19:10:00+00:00

i created a nsarraycontroller to display its data on my nstableview. this is working.

  • 0

i created a nsarraycontroller to display its data on my nstableview. this is working. but how do i modify this data now?

[arrayController addObject:[...]]

adds an object, how do i get it back?

i tried:

NSMutableArray *data = [arrayController mutableArrayValueForKey:@"column1"];]

but then i get this error

2011-05-29 19:25:50.125 TestApp[1665:903] [<NSArrayController 0x113808500> valueForUndefinedKey:]: this class is not key value coding-compliant for the key column1.

(the objects in my arraycontroller representing the rows in my view are of a class (named FileEntry) consisting of 4 properties and i added these as keys to my nsarraycontroller)

i thought kvc-compilant means every attribute has a getter and setter? (and isnt that what properties do?).

i tested my class if i could use this function:

FileEntry *entry = [[FileEntry alloc] initWithUrl:@"test"];  //(this adds the string "test" to the property "fileurl")
NSLog(@"%@\n", [entry valueForKey:@"fileurl"]);

and it returns:
> 2011-05-29 19:31:54.760 TestApp[1718:903] test

and it works. so how can my class not be kvc-compilant?

anyway, i also tried to use the tableviews datasource instead but cant get those 2 functions to work. would that be of more use than the nsarraycontroller? is it even possible to modify data of the nsarraycontroller?

  • 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-22T19:10:01+00:00Added an answer on May 22, 2026 at 7:10 pm

    Usually you need a contend array for the NSArrayController to handle, so you could simply take this array and use the NSMutableArray methods. For example you have in your MyController.h a declaration of an array with its setter and getter methods, and you only have to bind the contend array of the array controller to it. Then you can take two buttons for the add and remove methods of the array controller to add something. Now you must bind the value of the column to e.g. FileEntry.fileurl of your array controller managed objects, Now you should be able to add stuff to the table view. And you can also Edit the names in the table view. If you want to get some stuff out of the array in your program somewhere, you can use an outlet of your table view like this:

    NSInteger row = [myTableViewOutlet selectedRow];
    FileEntry* myEntry = [myArray objectAtIndex:row];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working this issue for a while now and I am open to
I have a NSArrayController bound to a NSTableView. With this I have the typical
Created a new App, created a new Fanpage for this App but if i
Created javascript widget. Testing on my own domain and its working fine. However when
Created .NET WCF service, tested it - works. Generated schemas from Data and service
I have a set of data created by another app and stored in XML
Created by Microsoft as the foundation of its .NET technology, the Common Language Infrastructure
Created a phonegap application using jQuery Mobile. Everything is working great for the most
Using this guide I have created a static library (let's call it AppCore )
Created a button, now tried to add it to the screen and im getting

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.