Questions tagged [nsruleeditor]

A view object that allows the user to visually create and configure a list of options which are expressed by the rule editor as a predicate.

A view object that allows the user to visually create and configure a list of options which are expressed by the rule editor as a predicate.

The view has a tree of choices exposed by a delegate. The choices are presented by the view to the user as a row of popup buttons, static text fields, and custom views. Each row in the list represents a particular path down the tree of choices.

8 questions
1
vote
3 answers

Why is NSPredicateEditor automatically localizing some Expression strings? How to disable?

I'm finding that some NSPredicateEditor / NSPredicateEditorRowTemplate values are being localized automatically by OS X. This is easily observable in the mapping of operators: .equalTo to the string is. But I just noticed that UTI strings are being…
pkamb
  • 33,281
  • 23
  • 160
  • 191
1
vote
1 answer

Cocoa interface element to add/remove fields like rules editor in Mail.app

What is the name of the Cocoa interface with buttons to add/remove rows? Here is a picture of it in the mail app Is this a standard interface or is it a custom feature?
kyle k
  • 5,134
  • 10
  • 31
  • 45
1
vote
2 answers

NSPredicateEditor: Stop rows from drawing a background

Here's an image of an NSPredicateEditor in one of my apps: What I'd like to do is stop the class from drawing the grey background in each row and the "separator" lines between rows, leaving just the popup buttons, textfields and text in each row.…
Bryan
  • 4,628
  • 3
  • 36
  • 62
0
votes
1 answer

Why is my NSRuleEditor not displaying criteria?

I am trying to get an NSRuleEditor to display criteria. It works (creates a static label) if I give it a single criterion, but the moment I give it more than one, each row of the rule editor is blank (no subviews are added other than the add/remove…
ThatsJustCheesy
  • 1,370
  • 14
  • 24
0
votes
1 answer

Having trouble displaying saved criteria using NSRuleEditor

I setup a NSRuleEditor for user to edit rules to filter an array, I have no trouble for user to edit rules, but I couldn't find a way to display the rules that I saved for user, does anyone have any ideas? I have rules prepared for each row and…
Vamston
  • 31
  • 1
  • 7
0
votes
3 answers

Highlighting selected rows in an NSPredicateEditor

The NSPredicateEditor's superclass NSRuleEditor exposes a selectedRowIndexes: IndexSet property (and corresponding selectRowIndexes(IndexSet, byExtendingSelection: Bool) setter). Adding an observer on this property shows that it is indeed changed…
marcprux
  • 9,845
  • 3
  • 55
  • 72
0
votes
1 answer

Performing action when NSRuleEditor criterion is selected

How can I determine which criterion is being selected in the NSPopUpButton menu of an NSRuleEditor? Inside ruleEditorRowsDidChange(_:) I could track the criteria for each row and process the changes manually, but it seems like there should be an…
Andrew
  • 7,630
  • 3
  • 42
  • 51
0
votes
2 answers

Using NSPredicateEditor, is there a way to get all of the Finder search categories for free?

I'm adding an NSPredicateEditor to my app to allow the user to seach for specific files and categories of files. The default NSPredicateEditor template from Inteface Builder adds a control containing only "name", "address", and "sign" categories.…
pkamb
  • 33,281
  • 23
  • 160
  • 191