Important: The information in this document is obsolete and should not be used for new development.
Inherits from | |
Implements | |
Package | com.apple.cocoa.application |
Availability | Available in Mac OS X v10.3 and later. |
Companion guide |
NSController is an abstract class that implements the base functionality required by the Controller Layer.
Creates and returns an empty NSController.
public NSController
()
Creates a relationship between the receiver’s binding and the property of observableController specified by keyPath.
public void bind
(String binding, Object observableController, String keyPath, NSDictionary options)
The binding is the key path for a property of the receiver previously exposed. The options dictionary is optional. If present, it contains placeholder objects or an NSValueTransformer identifier as described in “Constants.”
Causes the receiver to attempt to commit any pending edits, returning true
if successful or no edits where pending.
public boolean commitEditing
()
A commit is denied if the receiver fails to apply the changes to the model object, perhaps due to a validation error.
Discards any pending changes by registered editors.
public void discardEditing
()
public boolean isEditing
()
Returns true
if there are any editors currently registered with the receiver, false
otherwise.
- (BOOL)isEditing
Invoked to inform the receiver that editor has uncommitted changes that can affect the receiver.
public void objectDidBeginEditing
(Object editor)
Invoked to inform the receiver that editor has committed or discarded its changes.
public void objectDidEndEditing
(Object editor)
© 1997, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-02-01)