2008 03 27Quicksilver-like search with NSPredicate
In Quicksilver, you can search for knt and it will find Keynote. Quicksilver finds results containing the letters in the order you specify them. You can then type tmt for Transmit, tm for TextMate, etc. You can get the same search results in
NSArrayController
thanks to NSPredicate
:
[myController setFilterPredicate:[NSPredicate predicateWithFormat:"name like[c] %@", "*k*n*t*"]]
.
[c] specifies case insensitive search.