Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In retrospect, this answer seems somewhat obvious:</p> <p>I actually described <em>3</em> predicate editor row templates, not one. The three templates are:</p> <ul> <li><code>dateKeyPath [&lt;, &lt;=, =, &gt;, &gt;=, !=] [NSDatePicker]</code></li> <li><code>dateKeyPath [inTheLast, notInTheLast] [NSTextField] [NSPopUpButton]</code></li> <li><code>dateKeyPath [between] [NSDatePicker] "and" [NSDatePicker]</code></li> </ul> <p>If you build these three predicate editor row templates and give them to the predicateEditor, the editor will realize that they're all using the same <code>dateKeyPath</code>, and display then crunch all their operators into a single popup button. It will then switch out the actual views to the right of the operator depending on which operator is selected.</p> <p><strong>Edit</strong></p> <p>For bonus points: you can modify the precision of the date pickers by overriding the <code>templateViews</code> method, retrieving the templateViews from <code>super</code>, and setting the <code>datePickerElements</code> on the appropriate pickers.</p> <p><strong>Edit 24 Nov 2010</strong></p> <p>For anyone who comes across this again, I've written a couple blog posts on creating custom <code>NSPredicateEditorRowTemplates</code>:</p> <ul> <li><a href="http://funwithobjc.tumblr.com/post/1646098126/creating-a-simple-nspredicateeditorrowtemplate" rel="nofollow noreferrer">Creating a simple <code>NSPredicateEditorRowTemplate</code></a></li> <li><a href="http://funwithobjc.tumblr.com/post/1677163679/creating-an-advanced-nspredicateeditorrowtemplate" rel="nofollow noreferrer">Creating an advanced <code>NSPredicateEditorRowTemplate</code></a> (this one shows how to do the <code>inTheLast</code> and <code>inTheNext</code> row template)</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload