Mac Developer Library

Developer

AppKit Framework Reference NSPredicateEditor Class Reference

Options
Deployment Target:

On This Page
Language:

NSPredicateEditor

Conforms To


Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.5 and later.

NSPredicateEditor is a subclass of NSRuleEditor that is specialized for editing NSPredicate objects.

NSPredicateEditor provides an NSPredicate property—objectValue (inherited from NSControl)—that you can get and set directly, and that you can bind using Cocoa bindings (you typically configure a predicate editor in Interface Builder). NSPredicateEditor depends on another class, NSPredicateEditorRowTemplate, that describes the available predicates and how to display them.

Unlike NSRuleEditor, NSPredicateEditor does not depend on its delegate to populate its rows (and does not call the populating delegate methods). Instead, its rows are populated from its objectValue property (an instance of NSPredicate). NSPredicateEditor relies on instances NSPredicateEditorRowTemplate, which are responsible for mapping back and forth between the displayed view values and various predicates.

NSPredicateEditor exposes one property, rowTemplates, which is an array of NSPredicateEditorRowTemplate objects.

  • Sets the row templates for the receiver.

    Declaration

    Swift

    var rowTemplates: [AnyObject]

    Objective-C

    @property(copy) NSArray *rowTemplates

    Parameters

    rowTemplates

    An array of NSPredicateEditorRowTemplate objects.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.5 and later.

  • Returns the row templates for the receiver.

    Declaration

    Swift

    var rowTemplates: [AnyObject]

    Objective-C

    @property(copy) NSArray *rowTemplates

    Return Value

    The row templates for the receiver.

    Discussion

    Until otherwise set, this contains a single compound NSPredicateEditorRowTemplate object.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.5 and later.