How do I create a "filter" search text field on a table view like iTunes has it?

iTunes has a "Search" text field into which you can enter some text to have the items in the NSTableView below it filtered "live", i.e. items that don't match the search term are removed from the list. It is very easy to implement this behavior in your application using a second array.
There is a more detailed article at Oreilly's MacDevCenter about this: - the interesting bits start on Page 4.

The Reader's Digest version with some clarifications follows:

Usually, you have a single NSMutableArray that contains all items for your list. To allow searching, simply create a second NSMutableArray that holds all search results. Since NSArrays hold references to the objects, both arrays will point to the same list items, but the second array will simply refer to only part of the items.

As long as the filter string isn't empty, have your data source return the item count and items of this second array. You can do this e.g. by adding an additional NSMutableArray* variable (called e.g. activeSet) that you make point to the sub-array you want to show in the list, and have your data source always refer to activeSet.

You have to be careful when deleting items, though, as you have to make sure both lists are in sync. Especially take care that:
1) Since both arrays retain the objects, make sure you remove an item from both arrays, or the item will still be around in the list that wasn't current.
2) item indexes into the sub-array will obviously be different than those in the full array. You can use removeObject: to remove an item from the array by pointer, as long as each object may only appear in the array once.
3) adding a new item means that if it isn't filtered out, you may also have to insert it into the second array

Changing items doesn't require any special work, since the actual objects both lists refer to are the same.