Clear NSSearchField

2014-10-18 Thread Randy Widell
It looks like a couple of people have asked about this in the past, but none of the answers are working for me. I am trying to clear the contents of a NSSearchField and have it go back to its empty state. I don’t have a pre-Yosemite Mac handy to check if this is a bug / new behavior in

Re: Clear NSSearchField

2014-10-18 Thread Randy Widell
Yeah, I tried that initially. An invalid parameter exception comes flying out of NSCell’s setStringValue. On Oct 18, 2014, at 14:59, Gerd Knops ge...@bitart.com wrote: Did you try to set it ti nil instead of an empty string? Gerd On Oct 18, 2014, at 4:51 PM, Randy Widell

Re: Clear NSSearchField

2014-10-18 Thread Kyle Sluder
On Sat, Oct 18, 2014, at 04:51 PM, Randy Widell wrote: That works somewhat, but not really. Half the time the search field remains the first responder as if the call to set the outline view as the first responder never happened. Have you tried forcing the text field to give up first responder

Re: Clear NSSearchField

2014-10-18 Thread Randy Widell
Yeah, that doesn’t work either. I’m clearing the search field in response to a change in selection in an outline view. Which means the search field is already not the first responder. So, setting the first responder to nil just makes the outline view give up first responder without affecting