• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MVC view/controller separation question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >RE: MVC view/controller separation question (From: Keith Blount <email@hidden>)

  • Prev by Date: RE: MVC view/controller separation question
  • Next by Date: Re: current font
  • Previous by thread: RE: MVC view/controller separation question
  • Next by thread: Re: MVC view/controller separation question
  • Index(es):
    • Date
    • Thread