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


