• 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: NSEditor, NSEditorRegistration Protocols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSEditor, NSEditorRegistration Protocols


  • Subject: Re: NSEditor, NSEditorRegistration Protocols
  • From: mmalcolm crawford <email@hidden>
  • Date: Sat, 6 Mar 2004 12:28:55 -0800

On Mar 3, 2004, at 1:54 AM, Allan Odgaard wrote:
On 3. Mar 2004, at 2:49, Alan Donsky wrote:
Anybody know about these informal protocols? I am trying to implement an NSView subclass that uses bindings and i think these protocols are involved in telling the controller that the view has changed so it can update the model.
I think it has already been stated, but these are not required. Simply expose your key and make all changes to that key either through set<Key>: or setValue:forKey:, these methods will send a will/didChangeValueForKey:, which the controller should observe -- and this is how it knows about changes made to your view.

This is wrong.

The controller observes the model, not the view. The view in turn observes the controller. Value changes are propagated from view, via controller, to model using KVC.

Editor registration is optional; it allows a view to notify a controller that changes are being made, so that unfinished changes can be committed for example before a window is closed.

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSEditor, NSEditorRegistration Protocols
      • From: Allan Odgaard <email@hidden>
References: 
 >NSEditor, NSEditorRegistration Protocols (From: Alan Donsky <email@hidden>)
 >Re: NSEditor, NSEditorRegistration Protocols (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: MAKE a movie/animation from some NSImages
  • Next by Date: Re: First Responder Problem [Solved]
  • Previous by thread: Re: NSEditor, NSEditorRegistration Protocols
  • Next by thread: Re: NSEditor, NSEditorRegistration Protocols
  • Index(es):
    • Date
    • Thread