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: Tue, 28 Jul 2009 17:23:24 -0700
On Jul 28, 2009, at 16:44, Daniel DeCovnick wrote:
-(NSSet *)allDescendentsJobs
{
...
}
But I can't bind JobsArrayController's content set to this because
"entity Folder does not support Key Value Coding for property
'allDescendentsJobs'" because, as I understand it, it's read-only*.
At this point I'm stuck. What do I do to get past this?
'allDescendentsJobs' (not how 'descendants' is spelled, btw) is not a
property of entity Folder, so of course you can't point a
NSArrayController in *entity* mode at it.
However, 'allDescendentsJobs' *is* a property of your custom
NSManagedObject subclass that corresponds to the entity, so you can
point a NSArrayController at it in *class* mode. That means you'll
have to compute an array instead of a set.
You have another problem, though. Your NSManagedObject subclass is
not (by the code you've sketched) KVO compliant for the
'allDescendentsJobs' property, so if you're expecting the table view
to update when the jobs change at some level, it won't.
_______________________________________________
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