• 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: change in model not reflected in interface
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change in model not reflected in interface


  • Subject: Re: change in model not reflected in interface
  • From: mmalcolm crawford <email@hidden>
  • Date: Fri, 29 Jul 2005 17:25:47 -0700


On Jul 29, 2005, at 5:12 PM, Scott Quiring wrote:

You need to post objectDidBeginEditing: and objectDidEndEditing: (see NSController docs for more) to the object controller.
Do this from the model setFoo: methods.



No! You should *not* do this. The documentation is very clear about this. You should change attributes in a key-value observing compliant manner. Typically this simply means using accessor methods that follow standard naming conventions (see <http:// developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/ index.html> and in particular <http://developer.apple.com/ documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/ AccessorConventions.html>).


The NSEditorRegistration protocol (which contains the methods objectDidBeginEditing: and objectDidEndEditing:) is also clearly defined in the documentation:

"The NSEditorRegistration informal protocol is implemented by controllers to provide an interface for a view, the editor, to inform the controller when it has uncommitted changes."
<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Protocols/NSEditorRegistration.html>


mmalc

_______________________________________________
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


  • Follow-Ups:
    • Re: change in model not reflected in interface
      • From: Edward Hillenbrand <email@hidden>
References: 
 >change in model not reflected in interface (From: Edward Hillenbrand <email@hidden>)
 >Re: change in model not reflected in interface (From: Scott Quiring <email@hidden>)

  • Prev by Date: Re: change in model not reflected in interface
  • Next by Date: NS_HANDLER mystery
  • Previous by thread: Re: change in model not reflected in interface
  • Next by thread: Re: change in model not reflected in interface
  • Index(es):
    • Date
    • Thread