< Previous PageNext Page > Hide TOC

NSArrayController Bindings

Related class
Availability
Available in Mac OS X v10.3 and later.

Contents:

Availability Bindings
Controller Content Bindings
Controller Content Parameters Bindings
Parameters Bindings


Availability Bindings

editable

A multiple-value binding that determines if the NSArrayController 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 NSArrayController are editable if a logical AND operation on all the editable bindings results in a Boolean value of YES.

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


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


Placeholders
DescriptionPlaceholder constantValue class
Multiple Values PlaceholderNSMultipleValuesPlaceholderBindingOptionNSNumber (Boolean) or NSNull
No Selection PlaceholderNSNoSelectionPlaceholderBindingOptionNSNumber (Boolean) or NSNull
Not Applicable PlaceholderNSNotApplicablePlaceholderBindingOptionNSNumber (Boolean) or NSNull
Null PlaceholderNSNullPlaceholderBindingOptionNSNumber (Boolean) or NSNull

Controller Content Bindings

contentArray

An indexed collection that specifies the content of the NSArrayController.

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 Mac OS X v10.3 and later.


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in Mac OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOptionNSNumber (Boolean)
Conditionally Sets EditableNSConditionallySetsEditableBindingOptionNSNumber (Boolean)
NSDeletesObjectsOnRemoveBindingsOptionNSNumber (Boolean)
Handles Content As Compound ValueNSHandlesContentAsCompoundValueBindingOptionNSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOptionNSNumber (Boolean)
Selects All When Setting ContentNSSelectsAllWhenSettingContentBindingOptionNSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOptionNSNumber (Boolean)

contentArrayForMultipleSelection

An indexed collection specifying the items that the NSArrayController 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 NSArrayController displays the detail objects in a master-detail relationship, and the master NSArrayController 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 Mac OS X v10.3 and later.
Binding is Read-Only.


Binding Options
OptionBinding option constantValue class
Conditionally Sets EditableNSConditionallySetsEditableBindingOptionNSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOptionNSNumber (Boolean)
Selects All When Setting ContentNSSelectsAllWhenSettingContentBindingOptionNSNumber (Boolean)

contentObject

An NSArrayController that the NSArrayController 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 NSArrayController.

Availability:
Available in Mac OS X v10.3 and later.


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in Mac OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOptionNSNumber (Boolean)
Conditionally Sets EditableNSConditionallySetsEditableBindingOptionNSNumber (Boolean)
NSDeletesObjectsOnRemoveBindingsOptionNSNumber (Boolean)
Handles Content As Compound ValueNSHandlesContentAsCompoundValueBindingOptionNSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOptionNSNumber (Boolean)
Selects All When Setting ContentNSSelectsAllWhenSettingContentBindingOptionNSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOptionNSNumber (Boolean)

contentSet

An NSSet that specifies the content of the NSArrayController.

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


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in Mac OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOptionNSNumber (Boolean)
Conditionally Sets EditableNSConditionallySetsEditableBindingOptionNSNumber (Boolean)
NSDeletesObjectsOnRemoveBindingsOptionNSNumber (Boolean)
Handles Content As Compound ValueNSHandlesContentAsCompoundValueBindingOptionNSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOptionNSNumber (Boolean)
Selects All When Setting ContentNSSelectsAllWhenSettingContentBindingOptionNSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOptionNSNumber (Boolean)

Controller Content Parameters Bindings

filterPredicate

The NSPredicate instance that is used by the NSArrayController to filter the array controller contents.

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


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in Mac OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOptionNSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOptionNSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOptionNSNumber (Boolean)

selectionIndexes

An NSIndexSet instance that specifies the indices of the selected rows in the NSArrayController.

Typically, selectionIndexes is bound automatically to the NSArrayController that the first NSTableColumn is bound to.

Availability:
Available in Mac OS X v10.3 and later.


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in Mac OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOptionNSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOptionNSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOptionNSNumber (Boolean)

sortDescriptors

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

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

Typically this binding is created automatically, binding to the sort descriptors of the NSArrayController of the initially bound NSTableColumn.

Availability:
Available in Mac OS X v10.3 and later.


Binding Options
OptionBinding option constantValue class
Always Presents Application Modal Alerts. Available in Mac OS X v10.4 and later.NSAlwaysPresentsApplicationModalAlertsBindingOptionNSNumber (Boolean)
Raises for Not Applicable KeysNSRaisesForNotApplicableKeysBindingOptionNSNumber (Boolean)
Validates ImmediatelyNSValidatesImmediatelyBindingOptionNSNumber (Boolean)

Parameters Bindings

managedObjectContext

The NSManagedObjectContext instance that the NSArrayController is registered with.

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


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



< Previous PageNext Page > Hide TOC


© 2004, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-10-31)


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.