Can't compile "Mail Search" example...

Here is the error I get:

Compiling Document.m (9 errors)
	Document.h:3: header file 'Cocoa/Cocoa.h' not found
	Document.m:7: undefined type, found `NSString'
	Document.m:14: undefined type, found `NSWindowController'
	Document.m:20: undefined type, found `NSData'
	Document.m:20: undefined type, found `NSString'
	Document.m:26: undefined type, found `BOOL'
	Document.m:26: undefined type, found `NSData'
	Document.m:26: undefined type, found `NSString'
	<built-in>:1:1: no macro name given in #define directive

Why does this happen? Did I delete something accidentally?

Make sure that the header file Document.h is well as below. The 8 remainig errors are due to the fact that he cannot find the Cocoa/Cocoa.h file where your missing types are defined :=))

// Document.h

#import <Cocoa/Cocoa.h>

@interface Document : NSDocument
{
}
@end