Can anyone let me know what the procedure is to create the grouped NSTableView similar to the Spotlight results.

You probably won't get 100% there with the default behaviour provided by NSTableView, but pretty close.
For OS X v10.5 and up if you provide a NSTableViewDelegate (NSTableViewDelegate Protocol Reference) there's tableView:isGroupRow: you can provide.
Here's what it does for Default and Source List style table views on 10.6:
(setting the grouping flag for folders)

You can also provide tableView:heightOfRow: to adjust the row spacing and it get's pretty close (though with the group and content on different rows):

Other options that come to mind:
NSCell with image and text plus styling, or NSView based table view and an appropriate template The TableViewPlayground example might offer a good starting point for the latter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With