The NSRuleEditorDelegate protocol defines the optional methods implemented by delegates of NSRuleEditor objects.


protocol NSRuleEditorDelegate


Providing Data

func ruleEditor(NSRuleEditor, numberOfChildrenForCriterion: Any?, with: NSRuleEditor.RowType) -> Int

Returns the number of child items of a given criterion or row type.


func ruleEditor(NSRuleEditor, predicatePartsForCriterion: Any, withDisplayValue: Any, inRow: Int) -> [NSRuleEditor.PredicatePartKey : Any]?

Returns a dictionary representing the parts of the predicate determined by the given criterion and value.

struct NSRuleEditor.PredicatePartKey

These strings are used as keys to the dictionary returned from the delegate’s ruleEditor(_:predicatePartsForCriterion:withDisplayValue:inRow:) optional method. To construct a valid predicate, the union of the dictionaries for each item in the row must contain the required parts.

Monitoring Row Changes

func ruleEditorRowsDidChange(Notification)

Notifies the receiver that a rule editor’s rows changed.


Inherits From

See Also

Configuring the Delegate

var delegate: NSRuleEditorDelegate?

The rule editor’s delegate.