Next Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

NSControllerPlaceholders

Inherits from
Package
com.apple.cocoa.application
Availability
Available in Mac OS X v10.3 and later.
Companion guide

Overview

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.

Tasks

Constructors

Managing Default Placeholders

Obtaining Controller Markers

Testing Markers

Constructors

NSControllerPlaceholders

Creates a new NSControllerPlaceholders instance.

public NSControllerPlaceholders()

Discussion

All NSControllerPlaceholders methods are static, so there is no need create individual instances.

Static Methods

defaultPlaceholderForMarker

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)

Discussion

marker can be null or one of the controller markers returned by multipleValuesMarker, noSelectionMarker, and notApplicableMarker.

Availability
See Also

isControllerMarker

Returns whether marker is a valid controller marker.

public static boolean isControllerMarker(Object marker)

Discussion

Valid controller markers are returned by multipleValuesMarker, noSelectionMarker, and notApplicableMarker.

Availability

multipleValuesMarker

Returns a marker which indicates that a controller’s selection contains multiple items.

public static Object multipleValuesMarker()

Availability
See Also

noSelectionMarker

Returns a marker which indicates that a controller’s selection is currently empty.

public static Object noSelectionMarker()

Availability
See Also

notApplicableMarker

Returns a marker which indicates that a controller does not support selection.

public static Object notApplicableMarker()

Discussion

NSUserDefaultsController is an example of a controller that does not support the concept of selection.

Availability
See Also

setDefaultPlaceholderForMarker

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)

Discussion

marker can be null or one of the controller markers returned by multipleValuesMarker, noSelectionMarker, and notApplicableMarker.

Availability
See Also


Next Page > Hide TOC


© 1997, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-02-01)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.