• 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: Tableview with checkboxes for bidirectional to-many relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tableview with checkboxes for bidirectional to-many relationship


  • Subject: Re: Tableview with checkboxes for bidirectional to-many relationship
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 12 Jun 2005 17:14:36 -0700


On Jun 12, 2005, at 4:39 PM, Eli Cash wrote:

I'm working on a Core Data document-based application with bindings.
For the sake of discussion, let's say that I have two entities: Movie
and Actor. Each entity has a single attribute (name) and a to-many
relationship to the other.

Before going any further, you might consider adding another entity...

The classic "Movies" example in EOF uses a Role entity:

    Movie <->> Role <<-> Talent

Talent includes both actors and directors (since some actors are also directors):

    Movie <<- moviesDirected -- directors ->> Talent

However, what I *really* want is a single tableview that displays all
of my actors, and a checkbox column that is checked if the actor is
associated with the currently selected Movie. Checking & unchecking
should add/remove the actor from the relationship. [...]
Is there an easy way to do this that I'm overlooking?

I'm not sure offhand if there's an easy way using bindings (although I'll think about it a little longer) -- it may be easier to use a standard data source. For the principle behind the implementation of the get/set methods for the checkbox, see:
<http://www.stepwise.com/Articles/Technical/WOF_Checkboxes.html>


mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Tableview with checkboxes for bidirectional to-many relationship (From: Eli Cash <email@hidden>)

  • Prev by Date: Tableview with checkboxes for bidirectional to-many relationship
  • Next by Date: [Slightly OT] Game Programmer Salary?
  • Previous by thread: Tableview with checkboxes for bidirectional to-many relationship
  • Next by thread: [Slightly OT] Game Programmer Salary?
  • Index(es):
    • Date
    • Thread