• 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: Unable to use Managed Object Context proxy from Interface builder library
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to use Managed Object Context proxy from Interface builder library


  • Subject: Re: Unable to use Managed Object Context proxy from Interface builder library
  • From: Devarshi Kulshreshtha <email@hidden>
  • Date: Sun, 24 Nov 2013 17:16:30 -0600

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 <
email@hidden> 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 (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


References: 
 >Unable to use Managed Object Context proxy from Interface builder library (From: Devarshi Kulshreshtha <email@hidden>)

  • Prev by Date: Re: sandboxd deny file-write-create
  • Next by Date: Sending a message to a Toll free bridge
  • Previous by thread: Unable to use Managed Object Context proxy from Interface builder library
  • Next by thread: Sending a message to a Toll free bridge
  • Index(es):
    • Date
    • Thread