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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:24:37+00:00 2026-05-11T00:24:37+00:00

Here is my setup. In my application delegate, I have a property called currentFoo.

  • 0

Here is my setup.

In my application delegate, I have a property called currentFoo. The currentFoo property is set to the currently selected Foo instance. The Foo instances each have a property which is a NSMutableArray called results. The objects in results can be of various types, NSNumber, NSString, etc…

I have an NSTableView that is displayed at certain times which allows the user to see the collection of results in the currentFoo. There is also UI to allow adding to and deleting from the results.

The NSTableView has a single column which is bound to an NSArrayController’s arrangedObjects controller key. I have written a NSValueTransformer subclass that is used in this binding to convert the various possible types found in the results array to the string representation that I want shown in the table column.

The NSArrayController’s content array binding is connected to an NSObjectController’s selection controller key, with currentFoo.results as the model key path. Finally the NSObjectController gets its content from the application delegate.

This all works just great, adding, removing and displaying currentFoo.results in the NSTableView works just as I want.

My problem is when I try to edit the content of the table view. I have set my NSValueTransformer subclass to allow reverse transformations and have implemented reverseTransformedValue:, stepping through the code shows me that when I edit the value in the NSTableView row, it is correctly sent to that method of my value transformer, transformed and returned.

The error then occurs when the bindings try to then update the model with the reverse transformed value:

Cocoa Bindings: Error setting value for key path of object 0 (from bound object (null)): [ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key .

So basically there is this array bound to the table view, and when the user edits the row, I want to transform the string back to the appropriate object. Cocoa bindings gives me this error which leads me to believe I need to set something in the key path of the NSTableColumn binding, but I’m not sure what. I’ve tried ‘self’ and that didn’t work.

Any help is appreciated.

  • 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. 2026-05-11T00:24:38+00:00Added an answer on May 11, 2026 at 12:24 am

    The model key cannot be empty—hence the error message you get.

    Change the result objects from being primitive objects (strings, boxed numbers, etc.) to model objects (of class FooResult), and set the binding’s model key path to the name of the property of those model objects that you will have the table view mutate.

    Basically, you can’t bind directly to an array of primitive objects. You must bind to some property of an array of model objects.

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

Sidebar

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer My comments on Renaud Bompuis's answer messed up. Actually, you… May 11, 2026 at 11:37 pm
  • Editorial Team
    Editorial Team added an answer The behaviour you've described is expected. Remember that your super… May 11, 2026 at 11:37 pm
  • Editorial Team
    Editorial Team added an answer You didn't mention whether the SQL statement is in a… May 11, 2026 at 11:37 pm

Related Questions

I have an iPhone app that hides the status bar. However, my main view
I'm in the design stage for an app which will utilize a REST web
Ok, so I have a very simple form with next to no logic in
I am trying to work my way through basic iPhone programming and I have

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.