Re: Fun (or not) with NSArrayControllers and CoreData.
Re: Fun (or not) with NSArrayControllers and CoreData.
- Subject: Re: Fun (or not) with NSArrayControllers and CoreData.
- From: Quincey Morris <email@hidden>
- Date: Fri, 31 Jul 2009 14:26:00 -0700
On Jul 31, 2009, at 10:33, Daniel DeCovnick wrote:
-(IBAction)newJob:(id)sender
{
id folder = [self currentFolder];
CCCEJob *newJob = [NSEntityDescription
insertNewObjectForEntityForName:@"CCCEJob" inManagedObjectContext:
[self managedObjectContext]];
[folder addJobsObject:newJob];
newJob.rootFolder = [newJob getRootFolder];
}
Perhaps I was wrong about the inverse relationship getting set KVO-
compliantly. Instead of:
newJob.rootFolder = [newJob getRootFolder];
you could try:
[[newJob getRootFolder] addAllDescendantsJobsObject: newJob];
(after adding @dynamic addAllDescendantsJobsObject or whatever), or,
equivalently:
[[[newJob getRootFolder] mutableSetValueForKey:
@"allDescendantsJobs"] addObject: newJob];
_______________________________________________
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