How to add search filters like those in Finder?

  • Hi all,

    I need to implement add/remove filters for search results like those
    in Finder with the "+" and "-" and "save search" buttons (Those that
    appear under the spotlite search field when something is typed in it).
    When the "+" button is pushed another filter appears with popup
    buttons like "Kind", "Last open date", "Last modified date". When the
    "-" is pushed the filter disappears.

    My question is.. what kind of cocoa UI element is the whole line (with
    the add/remove buttons and popup buttons) and how should I implement
    showing and hiding? I couldn't find sample code with similar UI
    elements.

    Regards,
    Maya
  • On Apr 26, 2010, at 04:25, Maya Trifonova wrote:

    > I need to implement add/remove filters for search results like those in Finder with the "+" and "-" and "save search" buttons (Those that appear under the spotlite search field when something is typed in it). When the "+" button is pushed another filter appears with popup buttons like "Kind", "Last open date", "Last modified date". When the "-" is pushed the filter disappears.
    >
    > My question is.. what kind of cocoa UI element is the whole line (with the add/remove buttons and popup buttons) and how should I implement showing and hiding? I couldn't find sample code with similar UI elements.

    You probably want either NSRuleEditor or NSPredicateEditor.
  • On Mon, Apr 26, 2010 at 4:25 AM, Maya Trifonova <psixar4e...> wrote:
    > My question is.. what kind of cocoa UI element is the whole line (with the
    > add/remove buttons and popup buttons) and how should I implement showing and
    > hiding? I couldn't find sample code with similar UI elements.

    You want NSPredicateEditor.

    --Kyle Sluder
previous month april 2010 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today