Re: MVC view/controller separation question
Re: MVC view/controller separation question
- Subject: Re: MVC view/controller separation question
- From: Serge Meynard <email@hidden>
- Date: Mon, 04 Apr 2005 10:58:50 -0400
On Apr 4, 2005, at 10:39, Keith Blount wrote:
The only remaining problem is that the text view still
needs to update all of the ranges to which the notes
are attached in didChangeText, which should really be
part of the controller's job. I don't want to make the
notes manager the delegate of the text view and do it
all in textDidChange: because that makes everything
less flexible (the text view would not be able to
given an arbitrary delegate).
You might consider having the note view objects update their model
counterparts directly, but in your case I'm not sure they could know
when to do so, or figure out (inexpensively) what range they now refer
to. So you might want to make the document your delegate, and have it
handle the updates. The document can perform calculations and talk to
the note manager. If you're worried about the document object getting
"fat", you can also create a separate class to act as "text delegate"
and have it owned by the document.
_______________________________________________
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