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 15:41:25 -0700
On Jul 31, 2009, at 15:11, Daniel DeCovnick wrote:
That worked! The result was wrong, but making the rootFolder
relationship into rootFolders and making it to-many, changing
getRootFolder to -(NSArray *)allContainingFolders, and sending
everything in that the addAllDescendantsJobsObject: message worked
perfectly.
Good news. :)
Still, it's slightly disconcerting that setting the property doesn't
set the inverse relationship. How are you supposed to change it later?
I believe it *was* setting the inverse correctly, just not KVO-
compliantly. That is, your data model was correct, but the user
interface was out-of-date.
On a mostly unrelated note, is the only way to suppress the "no '-
addJobsObject:'/'-addAllDescendantsJobsObject:' method found"
warnings to create the Folder custom subclass and paste the Core
Data method declarations in? That approach seems like overkill since
I have nothing to customize in it.
I forgot, you can't use @dynamic because these aren't properties. What
you can do is put the method declarations in a category of your
subclass, and just not implement the category. See Xcodes's Design -->
Data Model --> Copy Obj-C 2.0 Method Declarations to Clipboard as a
way of avoiding re-inventing this for yourself. (But delete any
#ifdef'd stuff it gives you -- that's only if you're actually re-
implementing the methods.)
_______________________________________________
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