I am adding NSPredicateEditor to my application to allow the user to find specific files and file categories.
The default NSPredicateEditor template from Integer Builder adds a control containing only the categories "name", "address" and "sign". I am looking for more specific categories.

I know that I can add menu items to these menus in Interface Builder, but I really would not want the list of all categories and values ββto search for files to be saved.
In Finder, you can add a large number of categories and values ββto search.

Using the save of this search, then using the Get Info button, the predicate used to create the Finder NSPredicateEditor is displayed in the saved seach folder:
((** = "this*"cdw) && (kMDItemContentTypeTree = "public.png"cd) && InRange(kMDItemLastUsedDate,$time.today(-2d),$time.today(+1d)) && InRange(kMDItemContentModificationDate,$time.today(-4d),$time.today(+1d)) && InRange(kMDItemContentCreationDate,$time.today(-8d),$time.today(+1d)) && (kMDItemDisplayName = "*screenshot*"cd) && (kMDItemTextContent = "content*"cdw))
Clicking on the type of the Other category brings up a menu with a wide range of even more specific categories.

My question is, can I add this sophisticated and customizable NSPredicateEditor from Finder to my application? Or will I need to declare and then save a list of all the search types supported by my application?
pkamb source share