#import <Foundation/Foundation.h>
#import "FooSpellCheck.h"

int main() {

	NSAutoreleasePool *autoreleasepool= [[NSAutoreleasePool alloc] init];
	
	NSSpellServer *mySpellServer = [[[NSSpellServer alloc] init] autorelease];
	
	NSLog(@"New NSSpellServer instance starting.\n");
	
	if ([mySpellServer registerLanguage:@"Basque" byVendor:@"Foma"]) {

		NSLog(@"Basque language registered.\n");
		
		[mySpellServer setDelegate:[[[FooSpellCheckClass alloc] init] autorelease]];
		
		NSLog(@"Spell server delegate FooSpellCheck allocated.\n");
		[mySpellServer run];
		NSLog(@"Unexpected death of spellchecker FooSpellCheck!\n");
	} else {
		NSLog(@"NSSpellServer unable to register Basque language.\n");
	}
	[autoreleasepool release];
	return 0;
}
