(informal protocol)
Framework | /System/Library/Frameworks/AppKit.framework |
Availability | Available in Mac OS X v10.3 and later. |
Companion guide | |
Declared in | NSKeyValueBinding.h |
The NSPlaceholders
protocol provides an interface that allows an object to register default placeholders that will be displayed for a binding, when no other placeholder has been specified. Individual placeholder values can be specified for each of the marker objects (described in “Selection Markers”
), as well as when the property is nil
.
Placeholders are used when a property of an instance of the receiving class is accessed through a key value coding compliant method, and returns nil
or a specialized marker.
Returns an object that will be used as the placeholder for the binding, when a key value coding compliant property of an instance of the receiving class returns the value specified by marker, and no other placeholder has been specified.
+ (id)defaultPlaceholderForMarker:(id)marker withBinding:(NSString *)binding
The marker can be nil
or one of the constants described in “Selection Markers”
.
NSKeyValueBinding.h
Sets placeholder as the default placeholder for the binding, when a key value coding compliant property of an instance of the receiving class returns the value specified by marker, and no other placeholder has been specified.
+ (void)setDefaultPlaceholder:(id)placeholder forMarker:(id)marker withBinding:(NSString *)binding
The marker can be nil
or one of the constants described in “Selection Markers”
.
NSKeyValueBinding.h
The following constants are used to describe special cases for a controller’s selection.
id NSMultipleValuesMarker; id NSNoSelectionMarker; id NSNotApplicableMarker;
NSMultipleValuesMarker
This marker indicates that a key’s value contains multiple values that differ.
A binding can be configured to always return this marker for multiple items, even if the values are the same.
Available in Mac OS X v10.3 and later.
Declared in NSKeyValueBinding.h
.
NSNoSelectionMarker
This marker indicates that the controller’s selection is currently empty.
Available in Mac OS X v10.3 and later.
Declared in NSKeyValueBinding.h
.
NSNotApplicableMarker
This marker indicates that an object is not key-value coding compliant for the requested key.
Available in Mac OS X v10.3 and later.
Declared in NSKeyValueBinding.h
.
NSKeyValueBinding.h
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)