Re: [Newbie] Communication between two Views?
Re: [Newbie] Communication between two Views?
- Subject: Re: [Newbie] Communication between two Views?
- From: "I. Savant" <email@hidden>
- Date: Mon, 28 Jul 2008 15:12:07 -0400
>> I know how MVC works with one Model, one View and
>> one Controller but I really donĀ“t understnd how the controllers of different
>> Views communicate with each other.
>
> Through the model. The controllers of different views do not generally
> communicate directly.
That's a pretty general blanket statement that is most certainly
not always the case.
Consider (as a very basic example) a master/detail view (without the
use of Bindings, especially). Sure there're plenty of reasons I can
think of to have multiple controllers (one for the master list and one
for the detail view), but for every reason I can think of to
separate the controllers in this scenario, I can think of one that
strongly suggests keeping them as one.
The thing is, in this scenario they'd still need to talk *somehow*
(to track the master selection for determining what to show in the
detail view) and the model is *most definitely not* the place to track
selection in the master view. That is between the view(s) and the
controller(s).
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden