Re: Tableview with checkboxes for bidirectional to-many relationship
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