You can specify them in IB Don. In the tree of XIB elements (under the Objects header) locate and select the Table Column element. I the Identity Inspector the second heading reads User Interface Item Identifier. Set this to the column id you wish to use in your code (the variable name perhaps).
Erik Stainsby [email protected] ------------------------------------- Consistently place constants on the LHS of an expression: you cannot accidentally assign when you meant to compare. On 2012-03-09, at 1:32 PM, Donald Hall wrote: > 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 protected]) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/erik.stainsby%40roaringsky.ca > > This email sent to [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
