1
votes

Hello I am trying to bind the NSManagedObjectContext of my NSArrayController later by code. The controller gets loaded in the nib without a bound context. But I have a NSTableView bound to the array controller. I want the table to remain empty until I loaded some data into the context (and not show the old data in the context on launch). When I launch the app i get this error:

Cannot perform operation without a managed object context

Is this just not possible? Do I have to work around that or am I doing it wrong? I thought the controller would return nil without a context.

1

1 Answers

0
votes

Perhaps you would be better served programmatically binding the NSArrayController to the NSTableView once the context is populated appropriately?

Here's Apple documentation of the NSKeyValueBindingCreation informal protocol.