An interface for configuring a rule-based list of options.
SDK
- macOS 10.5+
Framework
- App
Kit
Declaration
@interface NSRuleEditor : NSControl
Overview
A rule editor lets the user visually create and configure a list of options that are expressed as a predicate (as described in Predicate Programming Guide). Each row displayed by the rule editor represents a particular path down a tree of choices. The rule editor's delegate provides the tree of choices to be displayed. The rule editor presents those choices to the user as a row of popup buttons, static text fields, and custom views.
NSRule
exposes one binding, rows
. You can bind rows
to an ordered collection (such as an instance of NSMutable
). Each object in the collection should have the following properties:
- @"rowType"
An integer representing the type of the row (
NSRule
).Editor Row Type - @"subrows"
An ordered to-many relation (such as an instance of
NSMutable
) containing the directly nested subrows for the given row.Array - @"displayValues"
An ordered to-many relation containing the display values for the row.
- @"criteria"
An ordered to-many relation containing the criteria for the row.