Re: NSSearchField
Re: NSSearchField
- Subject: Re: NSSearchField
- From: Joseph Heck <email@hidden>
- Date: Thu, 13 Nov 2003 22:40:30 -0800
The details are at
http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSSearchFieldCell.html
According to the docs, the searchMenuTemplate is defined in the
NSSearchFieldCell and is what is used by the cell to determine what
"components" of the search field are rendered into the Cell's view.
There's a list of constants immediately following to give you an idea
of what they mean:
NSSearchFieldRecentsTitleMenuItemTag
Identifies the menu item that is the title of the menu group for recent
search strings. It is hidden if there are no recent strings. You may
use this tagged item for separator characters that also do not appear
if there are no recent strings to display.
NSSearchFieldRecentsMenuItemTag
Identifies where recent search strings should appear in the recents
menu group.
NSSearchFieldClearRecentsMenuItemTag
Identifies the menu item for clearing the current set of recent string
searches in the menu. This item is hidden if there are no recent
strings.
NSSearchFieldNoRecentsMenuItemTag
Identifies the menu item that describes a lack of recent search strings
(for example, No recent searches). It is hidden if there have been
recent searches.
There's no obvious linkages from the NSSearchField into a controller
other than the action which I've implemented as "Search". The
NSSearchFieldCell does have a handy little method (-
(void)setSendsWholeSearchString:(BOOL)flag) that allows you to
determine when actions will be fired off to your controller. This works
particularly nicely when you implement the backend search with
something like SearchKit which includes support for prefix searching.
(I could still wish for a full Objective-C interface to the SearchKit
wrapped over the CoreFoundation one, but what's there is really
impressive and useful)
-joe
On Nov 13, 2003, at 7:52 PM, Kurt Marek wrote:
>
What is the connection 'searchMenuTemplate' in IB for NSSearchField? Do
>
I connect that to the controller object that implements
>
setSearchMenuTemplate: ?
>
>
Kurt
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.