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

Tableview with checkboxes for bidirectional to-many relationship


  • Subject: Tableview with checkboxes for bidirectional to-many relationship
  • From: Eli Cash <email@hidden>
  • Date: Sun, 12 Jun 2005 16:39:11 -0700

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.

I can easily create a couple of tableviews to manipulate each of
these, as well as a tableview which shows the associated actors for a
movie (it's bound to an array controller whose contentSet is in turn
bound to my original Movie controller's selection with the "actors"
relationship key).

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.

I've tried every hack I can think of (custom value transformers,
creating a derived array in a custom arrayController, overriding
arrangedObjects to wrap every managed object in a dictionary with a
"checked" key) and nothing seems to work. I don't want to set anything
directly in my Actor entity/object, as my model objects obviously
shouldn't be in the know about which Movie is selected.

Is there an easy way to do this that I'm overlooking? I'm hoping there
are some newly-minted Core Data/bindings experts out there in the week
following WWDC... thanks!
 _______________________________________________
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

  • Follow-Ups:
    • Re: Tableview with checkboxes for bidirectional to-many relationship
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Base-64 decode (was Property List Editor)
  • Next by Date: Re: Tableview with checkboxes for bidirectional to-many relationship
  • Previous by thread: Re: Tracked down the over-release bug
  • Next by thread: Re: Tableview with checkboxes for bidirectional to-many relationship
  • Index(es):
    • Date
    • Thread