I’ve set up an NSSearchField in a toolbar and connected an action in Interface Builder. This action gets called every time I enter some text, but not when I click the small cross to empty it or I somehow delete the text I just entered. Is this a bug or is it fixable?
I’ve set up an NSSearchField in a toolbar and connected an action in Interface
Share
Well, I figured out it actually works. My problem was that 1) I used the search string from the search field to filter some strings and searching a string for an empty string (@””) apparently returns no result 2) when I tried to log the search string using
NSLog(@"%@",searchString)I got some output only with a non-empty string, whileNSLog(@"sometexthere %@",searchString)seems to work!