• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Uncaught Exception: NSUnknownKeyException
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uncaught Exception: NSUnknownKeyException


  • Subject: Re: Uncaught Exception: NSUnknownKeyException
  • From: Donald Hall <email@hidden>
  • Date: Fri, 09 Mar 2012 14:32:35 -0700

Thanks to Mike and Graham for the replies.

I think I figured out where the problem was. I am putting data into an NSTableView, with one ivar from the Action class in each column. My original project was so old that it used nibs instead of xibs, so I redid them all. In the new Xcode there doesn't seem to be a way to specify the column identifier for the xib in the Attributes Inspector, and I forgot about this, so each column has an identifier of nil or null. I believe this explains the error message. Here is the top part of the stack trace:

	0   CoreFoundation                      0x918ded87 __raiseError + 231
	1   libobjc.A.dylib                     0x9b7f1149 objc_exception_throw + 155
	2   Foundation                          0x9548bd78 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 285
	3   Foundation                          0x953b1b97 _NSGetUsingKeyValueGetter + 39
	4   Foundation                          0x953b1b68 -[NSObject(NSKeyValueCoding) valueForKey:] + 406
	5   Script Timer                        0x00014991 -[MyDocument tableView:objectValueForTableColumn:row:] + 3249
	6   AppKit                              0x907c5c71 -[NSTableView _dataSourceValueForColumn:row:] + 69
	7   AppKit                              0x907c55e7 -[NSTableView preparedCellAtColumn:row:] + 420
	8   AppKit                              0x907d6c6c -[NSTableView _drawContentsAtRow:column:withCellFrame:] + 50

It looks like I'll either have to specify the identifiers in code or implement the new way to handle table columns using bindings. I will study the "NSTableViewBinding" sample project.

Thanks again, Don

On 2012-03-09, at 2:35 AM, Graham Cox wrote:

>
> On 09/03/2012, at 5:57 PM, Donald Hall wrote:
>
>> s class is not key value coding-compliant for the key (null).
>
>
> The key is nil (null). So the problem is where the key is coming from, not the operation of the Action class.
>
> --Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Uncaught Exception: NSUnknownKeyException
      • From: Erik Stainsby <email@hidden>
References: 
 >Uncaught Exception: NSUnknownKeyException (From: Donald Hall <email@hidden>)
 >Re: Uncaught Exception: NSUnknownKeyException (From: Graham Cox <email@hidden>)

  • Prev by Date: [solved] Re: Bundled framework not found despite copy build phase and being inside the bundle
  • Next by Date: Re: Uncaught Exception: NSUnknownKeyException
  • Previous by thread: Re: Uncaught Exception: NSUnknownKeyException
  • Next by thread: Re: Uncaught Exception: NSUnknownKeyException
  • Index(es):
    • Date
    • Thread