I am trying to clear the field NSSearchFieldby clicking the clear button on the right. I can not click on it.
Here is a screen recording of what happens at my end:

I used the following code found by RND:
[[[self.SrcFiled cell] cancelButtonCell] setAction:@selector(clearSearchField:)];
[[[self.SrcFiled cell] cancelButtonCell] setTarget:self];
But it does not work; I do not know how to fix this problem. Please suggest how to fix this.
source
share