bindings for many-to-many
bindings for many-to-many
- Subject: bindings for many-to-many
- From: "Justin Gullingsrud" <email@hidden>
- Date: Fri, 3 Mar 2006 09:42:24 -0800
I have a set of entities with a many-to-many relationship, let's call them
Departments and Professors. Professors can belong to zero or more
departments. I have a table view for departments, allowing one department
to be selected at a time. I also have
a table view for all professors, when shows the name of the professor and a
checkbox. What I want is for the checkbox to be true when the corresponding
professor belongs to the currently selected department.
So far I've not figured out a way to do this using combinations of
NSArrayControllers. One approach I've tried is to bind an
NSArrayController's contentArray to a boolean isProfessorInDepartment
property implemented in a custom controller class, and bind the checkbox's
table column value to that array controller. This approach is still giving
me problems, in part because I also have to deal with multiple sets of
professors and the comings and goings of departments. Is there a canonical
way of dealing with this sort of thing?
Thanks,
Justin
--
Studying texts and stiff meditation can make you lose your Original Mind.
A solitary tune by a fisherman, though, can be an invaluable treasure.
Dusk rain on the river, the moon peeking in and out of the clouds;
Elegant beyond words, he chants his songs night after night.
-- Ikkyu, "The Fisherman"
_______________________________________________
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