cora1sd
cora1sd

Reputation: 11

How to search a directory and display search results in a table in Objective-C

I want to create an iTunes style search function where a searchfield will look through the contents of a directory and display the results in an NSTableView.
This would be specifically for music so the searchfield should match either song name, artist name or song name.

Is there a way to do this in Objective-C without having the contents of the directory added into the NSTableView first?

Upvotes: 1

Views: 308

Answers (3)

Jay
Jay

Reputation: 6638

You'll want to use Spotlight for searching meta-data like artists and other song information:

SearchKit focus OTOH is on content search.

Upvotes: 1

Rob Napier
Rob Napier

Reputation: 299325

This is generally what SearchKit is for. It gives you access to the spotlight metadata, so that you can search for information like this very quickly.

Upvotes: 0

Jason Bugs Adams
Jason Bugs Adams

Reputation: 737

where is the "directory" located? are you talking about an actual directory on your local filesystem? I suggesting populating an array with the contents of a directory listing and then using on of the many howto's to get a search to populate a tableView.

http://cocoadev.com/index.pl?NSTableViewTutorial lesson 6

Upvotes: 0

Related Questions