Resolved this problem, by using below code :-)

- (void)awakeFromNib

{

    [self.listManagedObjectContext setPersistentStoreCoordinator:[
NSAppDelegate persistentStoreCoordinator]];

}


On Sun, Nov 24, 2013 at 2:53 PM, Devarshi Kulshreshtha <
devarshi.bluec...@gmail.com> wrote:

> I am making a simple mac os x app, in which I will be showing some records
> in a table view, after retrieving those from local db. I am using core data
> and NSArrayController proxy for the same and I am trying to achieve it
> through cocoa-bindings.
>
> Now I can easily make it working, by performing this binding in
> NSArrayController proxy:
>
> Proxy: NSArrayController
> Parameters: Managed Object Context
> Bind to: App Delegate
> Model Key Path: self.managedObjectContext
>
> but I am trying to use NSManagedObjectContext proxy from Interface builder
> library, for this binding:
>
> Proxy: NSArrayController
> Parameters: Managed Object Context
> Bind to: Managed Object Context
> Model Key Path: self
>
> I am surprised that there is no binding available for it, in bindings pan.
> At least there should be a binding to map persistent store coordinator to
> it.
>
> To assign MOC a persistent store coordinator, I am using below code:
>
> @property (strong) IBOutlet NSManagedObjectContext*listManagedObjectContext;
>
> [self.listManagedObjectContext setPersistentStoreCoordinator:[
> NSAppDelegate persistentStoreCoordinator]];
>
> Problem is - I am continuously getting this message in console:
>
> Cannot perform operation since managed object context has no persistent
> store coordinator
>
> With this stack backtrace:
>
>         0   CoreFoundation                      0x00007fff8b59fb06
> __exceptionPreprocess + 198
>
> 1   libobjc.A.dylib                     0x00007fff881103f0
> objc_exception_throw + 43
>
> 2   CoreFoundation                      0x00007fff8b59f8dc +[NSException
> raise:format:] + 204
>
> 3   AppKit                              0x00007fff907eb5e6
> -[_NSManagedProxy _persistentStoreCoordinator] + 81
>
> 4   AppKit                              0x00007fff907eb528
> -[_NSManagedProxy _entity] + 49
>
> 5   AppKit                              0x00007fff907eb43a
> -[_NSManagedProxy fetchRequestWithSortDescriptors:limit:] + 95
>
> 6   AppKit                              0x00007fff90cc04f0
> -[NSObjectController(NSManagedController)
> _executeFetch:didCommitSuccessfully:actionSender:] + 73
>
> My questions are -
>
> 1. What is the correct way of using NSManagedObjectContext proxy in
> interface builder library?
>
> 2. How can I resolve observed problem?
>
> Please suggest.
> --
> Thanks,
>
> Devarshi
>



-- 
Thanks,

Devarshi
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to