An interface for configuring a rule-based list of options.
- macOS 10.5+
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:
An integer representing the type of the row (
Editor Row Type
An ordered to-many relation (such as an instance of
NSMutable) containing the directly nested subrows for the given row.
An ordered to-many relation containing the display values for the row.
An ordered to-many relation containing the criteria for the row.