Function

NSIsControllerMarker(_:)

Tests whether a given object is special marker object used for indicating the state of a selection in relation to a key.

Declaration

func NSIsControllerMarker(_ object: Any?) -> Bool

Parameters

Term

Specify the object you want to check. This parameter can be nil.

Return Value

true if the object is one of the designated controller markers or false if it is not.

Discussion

This function helps you to create bindings between user interface elements and controller objects. The Application Kit predefines several special marker objects used as values for indicating selection state; currently these are NSMultipleValuesMarker, NSNoSelectionMarker, and NSNotApplicableMarker. These markers are typed as id and only exist for the purpose of indicating a state; they are never archived and cannot be used as object values in controls. You use this function to test whether a given object value is a marker, in which case it is not directly assignable to the object that is bound. This check is important, especially since additional markers may be added in the future.

See the NSKeyValueBinding.h header file for further details.

See Also

Managing bindings

func valueClassForBinding(NSBindingName) -> AnyClass?

Returns the class of the value that will be returned for the specified binding.

func bind(NSBindingName, to: Any, withKeyPath: String, options: [NSBindingOption : Any]?)

Establishes a binding between a given property of the receiver and the property of a given object specified by a given key path.

func optionDescriptionsForBinding(NSBindingName) -> [NSAttributeDescription]

Returns an array describing the options for the specified binding.

func infoForBinding(NSBindingName) -> [NSBindingInfoKey : Any]?

Returns a dictionary describing the receiver’s binding.

func unbind(NSBindingName)

Removes a given binding between the receiver and a controller.