Important: The information in this document is obsolete and should not be used for new development.
Inherits from | |
Package | com.apple.cocoa.application |
Availability | Available in Mac OS X v10.3 and later. |
Companion guide |
The NSControllerPlaceholders class provides an means for 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, as well as when the property is null
.
Placeholders are used when a property of an instance of the receiving class is accessed through a key value coding compliant method, and returns null
or a specialized marker.
Creates a new NSControllerPlaceholders instance.
public NSControllerPlaceholders
()
All NSControllerPlaceholders methods are static, so there is no need create individual instances.
Returns an object that will be used as the placeholder for the binding, when a key value coding compliant property of an instance of classObject returns the value specified by marker, and no other placeholder has been specified.
public static Object defaultPlaceholderForMarker
(Class classObject, Object marker, String binding)
marker can be null
or one of the controller markers returned by multipleValuesMarker
, noSelectionMarker
, and notApplicableMarker
.
Returns whether marker is a valid controller marker.
public static boolean isControllerMarker
(Object marker)
Valid controller markers are returned by multipleValuesMarker
, noSelectionMarker
, and notApplicableMarker
.
Returns a marker which indicates that a controller’s selection contains multiple items.
public static Object multipleValuesMarker
()
Returns a marker which indicates that a controller’s selection is currently empty.
public static Object noSelectionMarker
()
Returns a marker which indicates that a controller does not support selection.
public static Object notApplicableMarker
()
NSUserDefaultsController is an example of a controller that does not support the concept of selection.
Sets placeholder as the default placeholder for the binding, when a key value coding compliant property of an instance of classObject returns the value specified by marker, and no other placeholder has been specified.
public static void setDefaultPlaceholderForMarker
(Class classObject, Object placeholder, Object marker, String binding)
marker can be null
or one of the controller markers returned by multipleValuesMarker
, noSelectionMarker
, and notApplicableMarker
.
© 1997, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-02-01)