Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change in model not reflected in interface




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to 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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.