开发者

No action sent when NSSearchField is emptied?

I've set up an NSSearchField i开发者_如何学Gon 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?


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, while NSLog(@"sometexthere %@",searchString) seems to work!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜