Instance Method

ruleEditor(_:predicatePartsForCriterion:withDisplayValue:inRow:)

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

Declaration

optional func ruleEditor(_ editor: NSRuleEditor, predicatePartsForCriterion criterion: Any, withDisplayValue value: Any, inRow row: Int) -> [NSRuleEditor.PredicatePartKey : Any]?

Parameters

editor

The rule editor that sent the message.

criterion

The criterion for which the predicate parts are required.

value

The display value.

row

The row number of criterion.

Return Value

A dictionary representing the parts of the predicate determined by the given criterion and value. The keys of the dictionary should be the string constants specified in Predicate Part Keys with corresponding appropriate values.

See Also

Providing Data

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

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

Required.

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.