Re: bindings for many-to-many
Re: bindings for many-to-many
- Subject: Re: bindings for many-to-many
- From: "Justin Gullingsrud" <email@hidden>
- Date: Fri, 3 Mar 2006 10:23:59 -0800
Well - I guess I have a solution that's not too onerous: I ended up just
implementing data source methods for the table view, and checking if the
departments for the professor in the i'th row contain the currently selected
department.
Justin
On 3/3/06, Justin Gullingsrud <email@hidden> wrote:
>
> 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"
>
--
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