• 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: NSObjectController and Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSObjectController and Core Data


  • Subject: Re: NSObjectController and Core Data
  • From: "Kevin" <email@hidden>
  • Date: Fri, 23 Feb 2007 18:16:10 +0000
  • Importance: Normal
  • Sensitivity: Normal

Swapping the order of the calls does not appear to make a difference. The object controller is able to fetch the data without any errors regardless of the order of calls.

The question that remains unanswered is what is done differently in Interface Builder
when initializing an object controller in Entity mode, and how can it be replicated programmatically.

The object controller functions as it should in all aspects (in both cases), except one: notifying the mananged object context that it has begun editing in the case it is constructed programmatically.

As I mentioned in my earlier post, subclassing NSObjectController and overriding objectDidBeginEditing: and objectDidEndEditing: and explicitly registering the controller with the managed object context fixes the issue.

Unless someone can point out something obvious I've missed, I'll go ahead and file a bug on this.

To answer your question Sean, initializing the object controller with just init doesn't make a difference.

Kevin

Sent via BlackBerry from Cingular Wireless

-----Original Message-----
From: mmalc crawford <email@hidden>
Date: Fri, 23 Feb 2007 08:35:03
To:email@hidden
Cc:Sean McBride <email@hidden>, email@hidden
Subject: Re: NSObjectController and Core Data


On Feb 22, 2007, at 8:24 AM, Kevin wrote:

> [controller setEntityName:@"MyEntity"];
> [controller setManagedObjectContext:[self managedObjectContext]];
>
Swap the order of these lines.
(There should be an error message otherwise:
"Cannot perform operation without a managed object context")

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

  • Follow-Ups:
    • Re: NSObjectController and Core Data
      • From: mmalc crawford <email@hidden>
References: 
 >Fw: NSObjectController and Core Data (From: "Kevin" <email@hidden>)
 >Re: NSObjectController and Core Data (From: Kevin <email@hidden>)
 >Re: NSObjectController and Core Data (From: "Sean McBride" <email@hidden>)
 >Re: NSObjectController and Core Data (From: "Kevin" <email@hidden>)
 >Re: NSObjectController and Core Data (From: mmalc crawford <email@hidden>)

  • Prev by Date: Re: What does "access" mean for NSAppleScript?
  • Next by Date: Permissions
  • Previous by thread: Re: NSObjectController and Core Data
  • Next by thread: Re: NSObjectController and Core Data
  • Index(es):
    • Date
    • Thread