On Tue, 29 Mar 2011 18:15:28 -0700, Quincey Morris said:

>On Mar 29, 2011, at 14:57, Sean McBride wrote:
>
>> I've considered adding a optional transient to-one relationship to
>> Department named 'employeeId0' and binding the tablecolumn to
>> departmentsArrayController>arrangedObjects>employeeId0>name, but maybe
>> I'm barking up the wrong tree....
>
>There's no obvious reason from your description why employee ID 0 needs
>to be a Core Data property. Surely it can just be a normal derived property.
>
>Also, if it has no particular significance other than for populating the
>list, there's no real reason to implement the property in the data model
>itself. It seems more natural to implement it in your window controller.
>
>But I don't see anything actually wrong with your original suggestion,
>if you have a compelling reason to go that way.

Quincey,

Thanks for your reply.  However, I'm not sure I understand you exactly.
By 'normal derived property' do you mean in this sense:

<http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/
CoreData/Articles/cdFAQ.html#//apple_ref/doc/uid/TP40001802-SW3>

That FAQ is actually pretty darn close to my original question really.
But it's a little vague.  I've never been clear on when/where it's safe
to use KVO from one managedobject to another.  It says "You must add and
remove the parent [Department] as an observer as child objects
[Employees] are added to and removed from the relationship".  Where's
the correct place to catch items being added to/removed from a
relationship?  By implementing addEmployeesObject: and
removeEmployeesObject: in my Department class?

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to