Next Page > Hide TOC

NSPredicateEditor Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in Mac OS X v10.5 and later.
Declared in
NSPredicateEditor.h
Companion guides
Related sample code

Overview

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.

Tasks

Managing Row Templates

Instance Methods

rowTemplates

Returns the row templates for the receiver.

- (NSArray *)rowTemplates

Return Value

The row templates for the receiver.

Discussion

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

Availability
See Also
Declared In
NSPredicateEditor.h

setRowTemplates:

Sets the row templates for the receiver.

- (void)setRowTemplates:(NSArray *)rowTemplates

Parameters
rowTemplates

An array of NSPredicateEditorRowTemplate objects.

Availability
See Also
Declared In
NSPredicateEditor.h

Next Page > Hide TOC


© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)


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.