• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Binding tablecolumn to attribute of specific object in to-many relationship?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding tablecolumn to attribute of specific object in to-many relationship?


  • Subject: Re: Binding tablecolumn to attribute of specific object in to-many relationship?
  • From: Sean McBride <email@hidden>
  • Date: Wed, 30 Mar 2011 18:02:24 -0400
  • Organization: Rogue Research Inc.

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                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

  • Follow-Ups:
    • Re: Binding tablecolumn to attribute of specific object in to-many relationship?
      • From: Dado Colussi <email@hidden>
    • Re: Binding tablecolumn to attribute of specific object in to-many relationship?
      • From: Quincey Morris <email@hidden>
References: 
 >Binding tablecolumn to attribute of specific object in to-many relationship? (From: Sean McBride <email@hidden>)
 >Re: Binding tablecolumn to attribute of specific object in to-many relationship? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Two Applications Sharing Same Core Data Database
  • Next by Date: Re: Binding tablecolumn to attribute of specific object in to-many relationship?
  • Previous by thread: Re: Binding tablecolumn to attribute of specific object in to-many relationship?
  • Next by thread: Re: Binding tablecolumn to attribute of specific object in to-many relationship?
  • Index(es):
    • Date
    • Thread