An NSSearchField object implements a text field control that is optimized for performing text-based searches. The control provides a customized text field for entering search data, a search button, a cancel button, and a pop-up icon menu for listing recent search strings and custom search categories. An NSSearchField object wraps an NSSearchFieldCell object.
Questions tagged [nssearchfield]
115 questions
1
vote
2 answers
How to check if search buttonl of NSSearchField has been pressed
How do I check if I have pressed on an NSSearchField search button?
search button of NSSearchField
@IBAction func searchTextField(_ sender: NSSearchField) {
if `searchButtonIsClicked` {
//Code if searchButtonIsClicked
…

C. Piersigilli
- 11
- 3
1
vote
3 answers
How to not get NSSearchField freezing?
I've got a NSSearchField, whose action method does all the searching stuff, by analyzing the sender argument (string).
Now the searching stuff (feeding a large array) is kind of CPU intensive, which lets my search field freeze for some seconds.
In…

bijan
- 1,675
- 18
- 30
1
vote
0 answers
Can I search for whole strings in an NSSearchField/NSTextField (instead of only words)?
Users must be able to search for whole strings, by typing only part of a string.
Example:
"this is" should match to "Could you tell me where this is?"
The matching strings should be available in the dropdown, and the text field should show the…

robject
- 808
- 1
- 6
- 12
1
vote
1 answer
Style placeholder text NSSearchField and NSTextField?
I've been creating a MacOS app and am having trouble styling the font of an NSSearchField (named searchField). My code so far is as follows:
Declared at top of single main viewController class:
let normalTextStyle = NSFont(name: "PT Mono", size:…

Brickers
- 182
- 1
- 12
1
vote
1 answer
In Angular: on selecting option from dropdown I want to search in search field with that value
I am new to angular and I am stuck...
I want to create a dropdown as shown in this image where the placeholder in the textbox depends on the selected option from the dropdown.
My html is
1
vote
1 answer
SWIFT 3 OSX Cocoa Array Controller and CoreData Binding "Search on multiple columns"
I have a coredata entity bound to a tableView with 5 columns.
I am using an array controller for managing the tableview sorting etc.
My issue is with searching using the bindings. I have a searchField bound to the ArrayController and the predicate…

John Carto
- 165
- 1
- 4
1
vote
1 answer
How do I do Apple Finder -> File Info -> add tag feature in MacOSX app?
in my MacOSX app, I need to create something similar to Apple's own add a tag to a file feature within the file's info screen. Right now, I've created an NSTextField where the user can type the text which calls:
func…

jpgr
- 278
- 2
- 3
- 13
1
vote
1 answer
XCode style search field in NSMenu?
I'm trying to replicate the Menus displayed in XCode where you can begin typing and it will display a search field and then filter on the keyword entered. Can anyone point to a resource where it's implemented as an example or some clue as to what…

strangetimes
- 4,953
- 1
- 34
- 62
1
vote
1 answer
NSSearchField close button doesn't close the NSSearchField
I have to press over the X button very fast to close it actually
This is an untouched NSSearchField... is this a bug or this functionality needs to be special handled?

Peter Lapisu
- 19,915
- 16
- 123
- 179
1
vote
2 answers
NSTextView, where is it coming from when using NSSearchField and NSTextField
Where does NSTextView come from?
In my OSX application i have a NSSearchField, i implemented controlTextDidChange: which contains in key NSFieldEditor a NSTextView instance
- (void)controlTextDidChange:(NSNotification *)note {
NSTextView *…

Peter Lapisu
- 19,915
- 16
- 123
- 179
1
vote
1 answer
Yosemite blanking NSSearchField when deselected
This is new behavior not seen pre-Yosemite.
An NSSearchField contains text (result of searching). When the user clicks in a neighboring NSTextField, the NSSearchField contents vanish in 10.10, are retained in 10.9 and earlier. The app gets no…

vonlost
- 875
- 1
- 7
- 11
1
vote
0 answers
NSSearchField and tableview for dynamic search
I'm trying to port my IOS App on OSX.
In my IOS App I have a UISearchBar. When the user is typing a character I send HTTP requests to extract data from a server based on user input and I refresh the content of the tableview.
Next the user can select…

sebastien
- 2,489
- 5
- 26
- 47
1
vote
0 answers
NSTableview with 2 vertical headers
I try to achieve something like this:
I got a view-based NSTableview and i'd like to show the search results in this tableview. But i need to show the search results for web and for the local library search separately.
So i am wondering how i can…

dehlen
- 7,325
- 4
- 43
- 71
1
vote
1 answer
Search Field Predicate Format
I am having questions on using a NSSearchField. I binded it to my Dictionary Controller and now I would like to search from it. Here is the project
MyPlist(top)
My Header File(Bottom)
My Implementation:
My Interface
I have binded my Search to…

user1927992
- 123
- 1
- 7
1
vote
1 answer
How to change the behavior of cancelbutton in the NSSearchField?
In Finder , i find that the cancel button disappear when the NSSearchfield get focus first time,but when i input something to the searchfield,the cancel button is there all the time unless i click it.I also create a nssearchfield manully and input…

gohamgx
- 273
- 2
- 16