• 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
Binding tablecolumn to attribute of specific object in to-many relationship?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Binding tablecolumn to attribute of specific object in to-many relationship?
  • From: Sean McBride <email@hidden>
  • Date: Tue, 29 Mar 2011 17:57:04 -0400
  • Organization: Rogue Research Inc.

Hi all,

Consider a Core Data app, with Employee and Department entities.  The
Employee entity has 'name' and 'number' attributes.  Department has a to-
many relationship to Employees.

I need a tableview of departments, where one column should show the
'name' of the employee who's 'number' is 0.  The table needs to update
when an employee's 'name' or 'number' changes, or when employees are
added/removed from a department's employees relationship.

What's the best way to do this?

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....

Thanks,

--
____________________________________________________________
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: Quincey Morris <email@hidden>
  • Prev by Date: Re: Automatic graphics switching...
  • Next by Date: Re: Cocoa alternative for method aliasing?
  • Previous by thread: Re: Automatic graphics switching...
  • Next by thread: Re: Binding tablecolumn to attribute of specific object in to-many relationship?
  • Index(es):
    • Date
    • Thread