http://cocoawithlove.com/2009/12/sample-mac-application-with-complete.html