Contents

ruleEditor(_:child:forCriterion:with:)

Returns the child of a given item at a given index.

Declaration

@MainActor func ruleEditor(_ editor: NSRuleEditor, child index: Int, forCriterion criterion: Any?, with rowType: NSRuleEditor.RowType) -> Any

Parameters

  • editor:

    The rule editor that sent the message.

  • index:

    The index of the requested child criterion. This value must be in the range from 0 up to (but not including) the number of children, as reported by the delegate in Ruleeditor(_:numberofchildrenforcriterion:with:).

  • criterion:

    The parent of the requested child, or nil if the rule editor is requesting a root criterion.

  • rowType:

    The type of the row.

Return Value

An object representing the requested child (or root) criterion. This object is used by the delegate to represent that position in the tree, and is passed as a parameter in subsequent calls to the delegate.

Discussion

The delegate must implement this method.

See Also

Related Documentation

  • Predicate Programming Guide
  • Control and Cell Programming Topics

Providing Data