many to many - array controller binding confusion - help!
many to many - array controller binding confusion - help!
- Subject: many to many - array controller binding confusion - help!
- From: joe OneNinetyTwo <email@hidden>
- Date: Tue, 26 Sep 2006 18:58:11 -0700 (PDT)
I have a core data model with task objects and person
objects. I want to assign people (many persons) to a
given task. And a person can be assigned to multiple
tasks. To deal with this I created an assignment
object that turns my many to many relationship into
task <-->>assignment<<-->person
That part works fine.
I have two NSTableViews set up. One table displays
the Task attributes, and I want other table to display
the people assigned to each task (or tasks if multiple
tasks are selected).
I have a task array controller bound to the task
tableview.
For the person tableview, I set up an assignment array
controller with
(1) Content Set bound to the task controller
selection.assignments
(2) ContentArrayForMultipleSelection bound to the task
controller email@hiddennments
I have person table view column value bound to the
assignment controller with arrangedObjects.person.name
This sort of works. It displays all the names of
people assigned to the selected task(s). The problem
is when I have multiple tasks selected, I see
duplicate names in my person tableView.
I want to get rid of the duplicate names when multiple
tasks are selected, but I can't figure out the correct
logic for using distinctUnionOfSets and array
controllers to make it happen.
Suggestions would be greatly appreciated. I spend
too many hours with no succcess.
Thanks,
Philip
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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