NSTreeController Bindings

Related class
Availability
Available in OS X v10.4 and later.

Availability Bindings

editable

A multiple-value binding that determines if the NSTreeController is editable in the user interface.

When editable is bound, a new binding, editable2, is exposed and can be bound. Binding to editable2 causes editable3 to be exposed, and so on.

The contents of the NSTreeController are editable if a logical AND operation on all the editable bindings results in a Boolean value of YES.

Availability:
Available in OS X v10.4 and later.
Binding is Read-Only.


Binding Options
OptionBinding option constantValue class
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOption NSNumber (Boolean)


Placeholders
DescriptionPlaceholder constantValue class
Multiple Values PlaceholderNSMultipleValuesPlaceholderBindingOption NSNumber (Boolean) or NSNull
No Selection PlaceholderNSNoSelectionPlaceholderBindingOption NSNumber (Boolean) or NSNull
Not Applicable PlaceholderNSNotApplicablePlaceholderBindingOption NSNumber (Boolean) or NSNull
Null PlaceholderNSNullPlaceholderBindingOption NSNumber (Boolean) or NSNull

Controller Content Bindings

contentArray

An indexed collection that specifies the content of the NSTreeController.

The indexed collection is an NSArray instance or subclass, a property that is accessible using the key-value-coding indexed accessor methods, or is accessible through mutableArrayValueForKey:.

You should use the contentSet binding for Core Data to-many relationships.

Availability:
Available in OS X v10.4 and later.


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOption NSNumber (Boolean)
Conditionally Sets EditableNSConditionallySetsEditableBindingOption NSNumber (Boolean)
NSDeletesObjectsOnRemoveBindingsOption NSNumber (Boolean)
Handles Content As Compound ValueNSHandlesContentAsCompoundValueBindingOption NSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOption NSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOption NSNumber (Boolean)

contentArrayForMultipleSelection

An indexed collection specifying the items that the NSTreeController treats as its content objects when the contentArray or contentObject binding returns the multiple selection marker.

The indexed collection is an NSArray instance or subclass, a property that is accessible using the key-value-coding indexed accessor methods, or is accessible through mutableArrayValueForKey:.

This binding is used when the NSTreeController displays the detail objects in a master-detail relationship, and the master controller allows multiple selection. Typically when multiple items are selected in the master controller, the detail controller bindings return the values set as the multiple values placeholder. When contentArrayForMultipleSelection is bound, the items in that array are used instead.

This binding is useful when combined with array operators. For example, contentArray is bound to the "selection.employees' keypath of companyArrayController and, contentArrayForMultipleSelection is bound to the "selection.@distinctUnionOfArrays.employees" keypath of companyArrayController. When a single company is selected in companyArrayController, the employees of that company are used as the content. When multiple companies are selected, the employees from all the selected companies are used as content.

Availability:
Available in OS X v10.4 and later.
Binding is Read-Only.


Binding Options
OptionBinding option constantValue class
Conditionally Sets EditableNSConditionallySetsEditableBindingOption NSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOption NSNumber (Boolean)

contentObject

An object that the NSTreeController treats as its content.

This is bound when the object is the detail controller in a master-detail configuration. The binding is typically created with the selection key path in the master array controller that represents an attribute or to-one relationship. When the master array controller's selection returns the multiple selection marker, the contentArrayForMultipleSelection binding is used as the content of the NSTreeController.

Availability:
Available in OS X v10.4 and later.


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOption NSNumber (Boolean)
Conditionally Sets EditableNSConditionallySetsEditableBindingOption NSNumber (Boolean)
NSDeletesObjectsOnRemoveBindingsOption NSNumber (Boolean)
Handles Content As Compound ValueNSHandlesContentAsCompoundValueBindingOption NSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOption NSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOption NSNumber (Boolean)

contentSet

An NSSet that specifies the content of the NSTreeController.

Availability:
Available in OS X v10.4 and later.


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOption NSNumber (Boolean)
Conditionally Sets EditableNSConditionallySetsEditableBindingOption NSNumber (Boolean)
NSDeletesObjectsOnRemoveBindingsOption NSNumber (Boolean)
Handles Content As Compound ValueNSHandlesContentAsCompoundValueBindingOption NSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOption NSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOption NSNumber (Boolean)

Controller Content Parameters Bindings

selectionIndexPaths

An array of NSIndexPath instances that specify the current selection in the NSTreeController.

Availability:
Available in OS X v10.4 and later.


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOption NSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOption NSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOption NSNumber (Boolean)

sortDescriptors

An indexed collection of NSSortDescriptor instances that specify the sort ordering of the contents of the NSTreeController.

The indexed collection is an NSArray instance or subclass, or a property that is accessible using the key-value-coding indexed accessor methods.

Availability:
Available in OS X v10.4 and later.


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOption NSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOption NSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOption NSNumber (Boolean)

Parameters Bindings

managedObjectContext

The NSManagedObjectContext instance that the NSTreeController is registered with.

Availability:
Available in OS X v10.4 and later.
Binding is Read-Only.


Binding Options
OptionBinding option constantValue class
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOption NSNumber (Boolean)