My environment is as follows:
macOS Catalina
Xcode 12
StoryBoard
Single Window/View Controller - the view controller has custom code to populate a tableView in the View Controller
The tableView has 7 columns and is populated from a SQLite table.
The tableView displays data for 6 of the 7 columns. On the last column I get the following error:
valueForUndefinedKey:]: this class is not key value coding-compliant for the key itemUsedLast.
I have searched for information on this error and what I have found is it seems to be saying that for the field itemUsedLast can not find an outlet? But in the case for a tableview the only IBOutlet is one for the entire tableView. Also, the identifiers in the storyboard match the code in the custom view controller.
I have completed several tableViews before and have not run into this issue.
I have tried several remedies but none resolved this issue.
Any thoughts on how to debug this further or resolve this will be appreciated.
Thanks
macOS Catalina
Xcode 12
StoryBoard
Single Window/View Controller - the view controller has custom code to populate a tableView in the View Controller
The tableView has 7 columns and is populated from a SQLite table.
The tableView displays data for 6 of the 7 columns. On the last column I get the following error:
valueForUndefinedKey:]: this class is not key value coding-compliant for the key itemUsedLast.
I have searched for information on this error and what I have found is it seems to be saying that for the field itemUsedLast can not find an outlet? But in the case for a tableview the only IBOutlet is one for the entire tableView. Also, the identifiers in the storyboard match the code in the custom view controller.
I have completed several tableViews before and have not run into this issue.
I have tried several remedies but none resolved this issue.
Any thoughts on how to debug this further or resolve this will be appreciated.
Thanks
I suspect you have a problem here :
Try to comment it out.
Code Block func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) -> Any? { let identifier = tableColumn?.identifier let str = items[row].value(forKey: identifier!.rawValue) return str }
Try to comment it out.