Re: NSObjectController and Core Data
Re: NSObjectController and Core Data
- Subject: Re: NSObjectController and Core Data
- From: "Sean McBride" <email@hidden>
- Date: Fri, 23 Feb 2007 10:50:00 -0500
- Organization: Rogue Research
On 2007-02-22 16:24, Kevin said:
>The following code is from applicationDidFinishLaunching:. in my
>application delegate. For the sake of simplicity, there is only one
>entity in my model of which a single instance is created if it doesn't
>exist already.
>
>controller = [[NSObjectController alloc] initWithContent:nil];
>[controller setEntityName:@"MyEntity"];
>[controller setManagedObjectContext:[self managedObjectContext]];
>[controller setFetchPredicate:[NSPredicate predicateWithFormat:@"id == 1"]];
Kevin,
Well I don't really see a problem, but I'm pretty new to Core Data too.
If I were to guess, maybe the initWithContent: is putting it into
'Object' mode. Maybe try just a plain 'alloc init' instead?
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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